diff options
author | daniel <dkinzler@wikimedia.org> | 2022-03-04 23:00:02 +0100 |
---|---|---|
committer | daniel <dkinzler@wikimedia.org> | 2022-03-16 22:44:25 +0100 |
commit | e239b02a5ee993e25764d625b8d5b23124251ee8 (patch) | |
tree | bb3095b51650e6f9d988b0115a795963ecab10fc /tests/phpunit/includes/filerepo/file | |
parent | 5ec380a8f65c5429cf350806cc20580116469708 (diff) | |
download | mediawikicore-e239b02a5ee993e25764d625b8d5b23124251ee8.tar.gz mediawikicore-e239b02a5ee993e25764d625b8d5b23124251ee8.zip |
Add convenience methods for asserting status.
This ensures that assertions work in a uniform way,
and provides meaningful messages in cause of failure.
Change-Id: Ic01715b9a55444d3df6b5d4097e78cb8ac082b3e
Diffstat (limited to 'tests/phpunit/includes/filerepo/file')
-rw-r--r-- | tests/phpunit/includes/filerepo/file/LocalFileTest.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/phpunit/includes/filerepo/file/LocalFileTest.php b/tests/phpunit/includes/filerepo/file/LocalFileTest.php index 6c3ddca2f432..bc72607ef671 100644 --- a/tests/phpunit/includes/filerepo/file/LocalFileTest.php +++ b/tests/phpunit/includes/filerepo/file/LocalFileTest.php @@ -849,7 +849,7 @@ class LocalFileTest extends MediaWikiIntegrationTestCase { $this->getTestSysop()->getUser(), $props ); - $this->assertSame( [], $status->getErrors() ); + $this->assertStatusGood( $status ); // Check properties of the same object immediately after upload $this->assertFileProperties( $props, $file ); // Check round-trip through the DB @@ -881,7 +881,7 @@ class LocalFileTest extends MediaWikiIntegrationTestCase { 'page text', 0 ); - $this->assertSame( [], $status->getErrors() ); + $this->assertStatusGood( $status ); // Test reupload $file = new LocalFile( $title, $repo ); @@ -892,7 +892,7 @@ class LocalFileTest extends MediaWikiIntegrationTestCase { 'page text', 0 ); - $this->assertSame( [], $status->getErrors() ); + $this->assertStatusGood( $status ); } public function provideReserializeMetadata() { |