Index: trunk/phase3/maintenance/tests/phpunit/includes/LicensesTest.php |
— | — | @@ -9,6 +9,6 @@ |
10 | 10 | "; |
11 | 11 | |
12 | 12 | $lc = new Licenses( array( 'licenses' => $str ) ); |
13 | | - $this->assertTrue( is_a( $lc, 'Licenses' ), 'Correct class' ); |
| 13 | + $this->assertThat( $r, $this->isInstanceOf( 'Licenses' ) ); |
14 | 14 | } |
15 | 15 | } |
Index: trunk/phase3/maintenance/tests/phpunit/includes/HttpTest.php |
— | — | @@ -119,7 +119,7 @@ |
120 | 120 | |
121 | 121 | $r = MWHttpRequest::factory( "http://www.example.com/this-file-does-not-exist" ); |
122 | 122 | $er = $r->execute(); |
123 | | - if ( is_a( $r, 'PhpHttpRequest' ) && version_compare( '5.2.10', phpversion(), '>' ) ) { |
| 123 | + if ( $r instanceof PhpHttpRequest && version_compare( '5.2.10', phpversion(), '>' ) ) { |
124 | 124 | $this->assertRegexp( "/HTTP request failed/", $er->getWikiText() ); |
125 | 125 | } else { |
126 | 126 | $this->assertRegexp( "/404 Not Found/", $er->getWikiText() ); |
— | — | @@ -538,7 +538,7 @@ |
539 | 539 | $jar = $r->getCookieJar(); |
540 | 540 | $this->assertThat( $jar, $this->isInstanceOf( 'CookieJar' ) ); |
541 | 541 | |
542 | | - if ( is_a( $r, 'PhpHttpRequest' ) && version_compare( '5.1.7', phpversion(), '>' ) ) { |
| 542 | + if ( $r instanceof PhpHttpRequest && version_compare( '5.1.7', phpversion(), '>' ) ) { |
543 | 543 | $this->markTestSkipped( 'Redirection fails or crashes PHP on 5.1.6 and prior' ); |
544 | 544 | } |
545 | 545 | $serialized = $jar->serializeToHttpRequest( "/search?q=test", "www.php.net" ); |
Index: trunk/phase3/maintenance/tests/phpunit/includes/api/ApiUploadTest.php |
— | — | @@ -596,7 +596,7 @@ |
597 | 597 | // see if it now doesn't exist; reload |
598 | 598 | $title = Title::newFromText( $fileName, NS_FILE ); |
599 | 599 | } |
600 | | - return ! ( $title && is_a( $title, 'Title' ) && $title->exists() ); |
| 600 | + return ! ( $title && $title instanceof Title && $title->exists() ); |
601 | 601 | } |
602 | 602 | |
603 | 603 | /** |