[+FEATURE] remove usage of deprecated methods in unit-tests
authorFelix Oertel <f@oer.tel>
Wed, 13 Jul 2011 21:41:19 +0000 (23:41 +0200)
committerFelix Oertel <f@oer.tel>
Wed, 13 Jul 2011 21:41:19 +0000 (23:41 +0200)
Using PHPUnit 3.5 some methods are marked deprecated as they
will be removed in PHPUnit 3.6. This methods should not longer
be used.

Change-Id: I61a84f9d9bd5a4d0e412a3db8956d0343e996d44

typo3/sysext/extbase/Tests/Unit/MVC/Controller/ArgumentsTest.php
typo3/sysext/extbase/Tests/Unit/Object/Container/ContainerTest.php
typo3/sysext/extbase/Tests/Unit/Persistence/QueryResultTest.php

index 79f9227..8b5fad4 100644 (file)
@@ -183,7 +183,7 @@ class Tx_Extbase_Tests_Unit_MVC_Controller_ArgumentsTest extends Tx_Extbase_Test
                $arguments->injectObjectManager($mockObjectManager);
 
                $addedArgument = $arguments->addNewArgument('dummyName');
-               $this->assertType('Tx_Extbase_MVC_Controller_Argument', $addedArgument, 'addNewArgument() either did not add a new argument or did not return it.');
+               $this->assertInstanceOf('Tx_Extbase_MVC_Controller_Argument', $addedArgument, 'addNewArgument() either did not add a new argument or did not return it.');
 
                $retrievedArgument = $arguments['dummyName'];
                $this->assertSame($addedArgument, $retrievedArgument, 'The added and the retrieved argument are not the same.');
index 0a1ffb4..2007cfd 100644 (file)
@@ -167,7 +167,7 @@ class Tx_Extbase_Tests_Unit_Object_Container_ContainerTest extends Tx_Extbase_Te
         */
        public function getEmptyObjectReturnsInstanceOfSimpleClass() {
                $object = $this->container->getEmptyObject('t3lib_object_tests_c');
-               $this->assertType('t3lib_object_tests_c', $object);
+               $this->assertInstanceOf('t3lib_object_tests_c', $object);
        }
 
        /**
index 8fd135f..e3cbc38 100644 (file)
@@ -66,7 +66,7 @@ class Tx_Extbase_Tests_Unit_Persistence_QueryResultTest extends Tx_Extbase_Tests
         * @test
         */
        public function getQueryReturnsQueryObject() {
-               $this->assertType('Tx_Extbase_Persistence_QueryInterface', $this->queryResult->getQuery());
+               $this->assertInstanceOf('Tx_Extbase_Persistence_QueryInterface', $this->queryResult->getQuery());
        }
 
        /**