Fixed silly backend test config bug.
authorAaron <aschulz@wikimedia.org>
Tue, 17 Apr 2012 17:25:52 +0000 (10:25 -0700)
committerAaron <aschulz@wikimedia.org>
Tue, 17 Apr 2012 17:25:52 +0000 (10:25 -0700)
Change-Id: I35b53dc609acb720c64f236cb58f91a73604e2f8

tests/phpunit/includes/filerepo/FileBackendTest.php

index da44797..2e95f55 100644 (file)
@@ -23,10 +23,11 @@ class FileBackendTest extends MediaWikiTestCase {
                                foreach ( $wgFileBackends as $conf ) {
                                        if ( $conf['name'] == $name ) {
                                                $useConfig = $conf;
+                                               break;
                                        }
                                }
                                $useConfig['name'] = 'localtesting'; // swap name
-                               $class = $conf['class'];
+                               $class = $useConfig['class'];
                                self::$backendToUse = new $class( $useConfig );
                                $this->singleBackend = self::$backendToUse;
                        }
@@ -823,7 +824,7 @@ class FileBackendTest extends MediaWikiTestCase {
                        $size = $this->backend->getFileSize( array( 'src' => $path ) );
                        $time = $this->backend->getFileTimestamp( array( 'src' => $path ) );
                        $stat = $this->backend->getFileStat( array( 'src' => $path ) );
-                       
+
                        $this->assertFalse( $size, "Correct file size of '$path'" );
                        $this->assertFalse( $time, "Correct file timestamp of '$path'" );
                        $this->assertFalse( $stat, "Correct file stat of '$path'" );