assertType() is deprecated, switching usages tp assertInternalType() and assertInstan...
authorX! <soxred93@users.mediawiki.org>
Tue, 28 Dec 2010 15:13:42 +0000 (15:13 +0000)
committerX! <soxred93@users.mediawiki.org>
Tue, 28 Dec 2010 15:13:42 +0000 (15:13 +0000)
tests/phpunit/includes/GlobalTest.php
tests/phpunit/includes/MessageTest.php
tests/phpunit/includes/api/ApiTest.php

index 599002e..426409e 100644 (file)
@@ -63,7 +63,7 @@ class GlobalTest extends PHPUnit_Framework_TestCase {
 
        function testTime() {
                $start = wfTime();
-               $this->assertType( 'float', $start );
+               $this->assertInternalType( 'float', $start );
                $end = wfTime();
                $this->assertTrue( $end > $start, "Time is running backwards!" );
        }
index 22d7363..fa696d2 100644 (file)
@@ -21,8 +21,8 @@ class MessageTest extends PHPUnit_Framework_TestCase {
        }
 
        function testKey() {
-               $this->assertType( 'Message', wfMessage( 'mainpage' ) );
-               $this->assertType( 'Message', wfMessage( 'i-dont-exist-evar' ) );
+               $this->assertInstanceOf( 'Message', wfMessage( 'mainpage' ) );
+               $this->assertInstanceOf( 'Message', wfMessage( 'i-dont-exist-evar' ) );
                $this->assertEquals( 'Main Page', wfMessage( 'mainpage' )->text() );
                $this->assertEquals( '&lt;i-dont-exist-evar&gt;', wfMessage( 'i-dont-exist-evar' )->text() );
        }
index 5df834d..29f9869 100644 (file)
@@ -70,7 +70,7 @@ class ApiTest extends ApiTestSetup {
 
                libxml_use_internal_errors( true );
                $sxe = simplexml_load_string( $resp );
-               $this->assertNotType( "bool", $sxe );
+               $this->assertNotInternalType( "bool", $sxe );
                $this->assertThat( $sxe, $this->isInstanceOf( "SimpleXMLElement" ) );
        }
 
@@ -101,7 +101,7 @@ class ApiTest extends ApiTestSetup {
 
                $result = $ret[0];
 
-               $this->assertNotType( "bool", $result );
+               $this->assertNotInternalType( "bool", $result );
                $a = $result["login"]["result"];
                $this->assertEquals( "NeedToken", $a );
 
@@ -117,7 +117,7 @@ class ApiTest extends ApiTestSetup {
 
                $result = $ret[0];
 
-               $this->assertNotType( "bool", $result );
+               $this->assertNotInternalType( "bool", $result );
                $a = $result["login"]["result"];
 
                $this->assertEquals( "WrongPass", $a );
@@ -140,8 +140,8 @@ class ApiTest extends ApiTestSetup {
                );
 
                $result = $ret[0];
-               $this->assertNotType( "bool", $result );
-               $this->assertNotType( "null", $result["login"] );
+               $this->assertNotInternalType( "bool", $result );
+               $this->assertNotInternalType( "null", $result["login"] );
 
                $a = $result["login"]["result"];
                $this->assertEquals( "NeedToken", $a );
@@ -157,7 +157,7 @@ class ApiTest extends ApiTestSetup {
 
                $result = $ret[0];
 
-               $this->assertNotType( "bool", $result );
+               $this->assertNotInternalType( "bool", $result );
                $a = $result["login"]["result"];
 
                $this->assertEquals( "Success", $a );
@@ -180,9 +180,9 @@ class ApiTest extends ApiTestSetup {
 
                libxml_use_internal_errors( true );
                $sxe = simplexml_load_string( $req->getContent() );
-               $this->assertNotType( "bool", $sxe );
+               $this->assertNotInternalType( "bool", $sxe );
                $this->assertThat( $sxe, $this->isInstanceOf( "SimpleXMLElement" ) );
-               $this->assertNotType( "null", $sxe->login[0] );
+               $this->assertNotInternalType( "null", $sxe->login[0] );
 
                $a = $sxe->login[0]->attributes()->result[0];
                $this->assertEquals( ' result="NeedToken"', $a->asXML() );
@@ -220,7 +220,7 @@ class ApiTest extends ApiTestSetup {
                $req->execute();
                libxml_use_internal_errors( true );
                $sxe = simplexml_load_string( $req->getContent() );
-               $this->assertNotType( "bool", $sxe );
+               $this->assertNotInternalType( "bool", $sxe );
                $this->assertThat( $sxe, $this->isInstanceOf( "SimpleXMLElement" ) );
                $a = $sxe->query[0]->pages[0]->page[0]->attributes();
        }