merge latest master into Wikidata branch
[lhc/web/wiklou.git] / tests / phpunit / MediaWikiTestCase.php
index d3dd389..5285288 100644 (file)
@@ -398,7 +398,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
         *         or list the tables under testing in $this->tablesUsed, or override the
         *         needsDB() method.
         */
-       protected function assertSelect( $table, $fields, $condition, Array $expectedRows ) {
+       protected function assertSelect( $table, $fields, $condition, array $expectedRows ) {
                if ( !$this->needsDB() ) {
                        throw new MWException( 'When testing database state, the test cases\'s needDB()' .
                                ' method should return true. Use @group Database or $this->tablesUsed.');
@@ -566,7 +566,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
         * @param string $message
         */
        protected function assertType( $type, $actual, $message = '' ) {
-               if ( is_object( $actual ) ) {
+               if ( class_exists( $type ) || interface_exists( $type ) ) {
                        $this->assertInstanceOf( $type, $actual, $message );
                }
                else {