Addshore has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/109472


Change subject: Add assertions in FileBackendTest
......................................................................

Add assertions in FileBackendTest

Change-Id: I02a1efc44cd5366f2b8e33015d79eb08fa935d20
---
M tests/phpunit/includes/filebackend/FileBackendTest.php
1 file changed, 3 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/72/109472/1

diff --git a/tests/phpunit/includes/filebackend/FileBackendTest.php 
b/tests/phpunit/includes/filebackend/FileBackendTest.php
index cee2da2..c9e76d9 100644
--- a/tests/phpunit/includes/filebackend/FileBackendTest.php
+++ b/tests/phpunit/includes/filebackend/FileBackendTest.php
@@ -1892,7 +1892,7 @@
                $base = self::baseStorePath();
 
                // Should have no errors
-               $iter = $this->backend->getFileList( array( 'dir' => 
"$base/unittest-cont-notexists" ) );
+               $this->backend->getFileList( array( 'dir' => 
"$base/unittest-cont-notexists" ) );
 
                $files = array(
                        "$base/unittest-cont1/e/test1.txt",
@@ -2034,9 +2034,7 @@
                }
 
                $iter = $this->backend->getFileList( array( 'dir' => 
"$base/unittest-cont1/not/exists" ) );
-               foreach ( $iter as $iter ) {
-                       // no errors
-               }
+               $this->assertInternalType( 'array', $iter );
        }
 
        /**
@@ -2237,9 +2235,7 @@
                }
 
                $iter = $this->backend->getDirectoryList( array( 'dir' => 
"$base/unittest-cont1/not/exists" ) );
-               foreach ( $iter as $file ) {
-                       // no errors
-               }
+               $this->assertInternalType( 'array', $iter );
 
                $items = $this->listToArray( $iter );
                $this->assertEquals( array(), $items, "Directory listing is 
empty." );

-- 
To view, visit https://gerrit.wikimedia.org/r/109472
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I02a1efc44cd5366f2b8e33015d79eb08fa935d20
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to