Skip to content

Commit

Permalink
#4049 Add tests for assertFileEqualsCanonicalizing
Browse files Browse the repository at this point in the history
  • Loading branch information
pwsdotru authored and sebastianbergmann committed Jan 13, 2024
1 parent ab9a20b commit df5a404
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/_files/bar.txt
@@ -0,0 +1 @@
Test for compare file
1 change: 1 addition & 0 deletions tests/_files/foo.txt
@@ -0,0 +1 @@
Test file for compare
11 changes: 11 additions & 0 deletions tests/unit/Framework/AssertTest.php
Expand Up @@ -1570,6 +1570,17 @@ public function testAssertStringNotMatchesFormatFile(): void
$this->assertStringNotMatchesFormatFile(TEST_FILES_PATH . 'expectedFileFormat.txt', "FOO\n");
}

public function testAssertFileEqualsCanonicalizing(): void
{
$this->assertFileEqualsCanonicalizing(TEST_FILES_PATH . 'foo.txt', TEST_FILES_PATH . 'foo.txt');

$this->assertFileEqualsCanonicalizing(TEST_FILES_PATH . 'foo.txt', TEST_FILES_PATH . 'bar.txt');

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

$this->assertFileEqualsCanonicalizing(TEST_FILES_PATH . 'foo.txt', TEST_FILES_PATH . 'foo.xml');
}

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

0 comments on commit df5a404

Please sign in to comment.