Switch on expected value, since the actual one can obviously be wrong
[lhc/web/wiklou.git] / tests / phpunit / MediaWikiTestCase.php
index 1cc45e0..f9e9f77 100644 (file)
@@ -536,7 +536,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 {