Skip to content

Commit

Permalink
Added testAssertStringNotEqualsFileCanonicalizing
Browse files Browse the repository at this point in the history
  • Loading branch information
alecsmrekar authored and sebastianbergmann committed Jan 13, 2024
1 parent b9d16de commit 9e38c8f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/unit/Framework/AssertTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1580,6 +1580,19 @@ public function testAssertFileEqualsCanonicalizing(): void
$this->assertFileEqualsCanonicalizing(TEST_FILES_PATH . 'foo.txt', TEST_FILES_PATH . 'foo.xml');
}

public function testAssertStringNotEqualsFileCanonicalizing(): void
{
$contents = file_get_contents(TEST_FILES_PATH . 'foo.xml');

$this->assertStringNotEqualsFileCanonicalizing(TEST_FILES_PATH . 'foo.xml', $contents . ' BAR');

$this->assertStringNotEqualsFileCanonicalizing(TEST_FILES_PATH . 'foo.xml', 'BAR');

$this->expectException(AssertionFailedError::class);

$this->assertStringNotEqualsFileCanonicalizing(TEST_FILES_PATH . 'foo.xml', $contents);
}

public function testStringsCanBeComparedForEqualityIgnoringCase(): void
{
$this->assertEqualsIgnoringCase('a', 'A');
Expand Down

0 comments on commit 9e38c8f

Please sign in to comment.