Skip to content

Commit

Permalink
Cleanup after 43c01a4
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Nov 25, 2019
1 parent 3c1e5ac commit 024cc91
Showing 1 changed file with 11 additions and 63 deletions.
74 changes: 11 additions & 63 deletions src/Framework/Assert.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,12 +294,7 @@ public static function assertNotCount(int $expectedCount, $haystack, string $mes
*/
public static function assertEquals($expected, $actual, string $message = ''): void
{
$constraint = new IsEqual(
$expected,
0.0,
false,
false
);
$constraint = new IsEqual($expected);

static::assertThat($actual, $constraint, $message);
}
Expand Down Expand Up @@ -355,12 +350,7 @@ public static function assertEqualsWithDelta($expected, $actual, float $delta, s
public static function assertNotEquals($expected, $actual, string $message = ''): void
{
$constraint = new LogicalNot(
new IsEqual(
$expected,
0.0,
false,
false
)
new IsEqual($expected)
);

static::assertThat($actual, $constraint, $message);
Expand Down Expand Up @@ -517,11 +507,8 @@ public static function assertFileEqualsCanonicalizing(string $expected, string $
static::assertFileExists($expected, $message);
static::assertFileExists($actual, $message);

$constraint = new IsEqual(
\file_get_contents($expected),
0.0,
10,
true
$constraint = new IsEqualCanonicalizing(
\file_get_contents($expected)
);

static::assertThat(\file_get_contents($actual), $constraint, $message);
Expand All @@ -539,13 +526,7 @@ public static function assertFileEqualsIgnoringCase(string $expected, string $ac
static::assertFileExists($expected, $message);
static::assertFileExists($actual, $message);

$constraint = new IsEqual(
\file_get_contents($expected),
0.0,
10,
false,
true
);
$constraint = new IsEqualIgnoringCase(\file_get_contents($expected));

static::assertThat(\file_get_contents($actual), $constraint, $message);
}
Expand Down Expand Up @@ -582,12 +563,7 @@ public static function assertFileNotEqualsCanonicalizing(string $expected, strin
static::assertFileExists($actual, $message);

$constraint = new LogicalNot(
new IsEqual(
\file_get_contents($expected),
0.0,
10,
true
)
new IsEqualCanonicalizing(\file_get_contents($expected))
);

static::assertThat(\file_get_contents($actual), $constraint, $message);
Expand All @@ -606,13 +582,7 @@ public static function assertFileNotEqualsIgnoringCase(string $expected, string
static::assertFileExists($actual, $message);

$constraint = new LogicalNot(
new IsEqual(
\file_get_contents($expected),
0.0,
10,
false,
true
)
new IsEqualIgnoringCase(\file_get_contents($expected))
);

static::assertThat(\file_get_contents($actual), $constraint, $message);
Expand Down Expand Up @@ -645,12 +615,7 @@ public static function assertStringEqualsFileCanonicalizing(string $expectedFile
{
static::assertFileExists($expectedFile, $message);

$constraint = new IsEqual(
\file_get_contents($expectedFile),
0.0,
10,
true
);
$constraint = new IsEqualCanonicalizing(\file_get_contents($expectedFile));

static::assertThat($actualString, $constraint, $message);
}
Expand All @@ -666,13 +631,7 @@ public static function assertStringEqualsFileIgnoringCase(string $expectedFile,
{
static::assertFileExists($expectedFile, $message);

$constraint = new IsEqual(
\file_get_contents($expectedFile),
0.0,
10,
false,
true
);
$constraint = new IsEqualIgnoringCase(\file_get_contents($expectedFile));

static::assertThat($actualString, $constraint, $message);
}
Expand Down Expand Up @@ -707,12 +666,7 @@ public static function assertStringNotEqualsFileCanonicalizing(string $expectedF
static::assertFileExists($expectedFile, $message);

$constraint = new LogicalNot(
new IsEqual(
\file_get_contents($expectedFile),
0.0,
10,
true
)
new IsEqualCanonicalizing(\file_get_contents($expectedFile))
);

static::assertThat($actualString, $constraint, $message);
Expand All @@ -730,13 +684,7 @@ public static function assertStringNotEqualsFileIgnoringCase(string $expectedFil
static::assertFileExists($expectedFile, $message);

$constraint = new LogicalNot(
new IsEqual(
\file_get_contents($expectedFile),
0.0,
10,
false,
true
)
new IsEqualIgnoringCase(\file_get_contents($expectedFile))
);

static::assertThat($actualString, $constraint, $message);
Expand Down

0 comments on commit 024cc91

Please sign in to comment.