[BUGFIX] Replace deprecated unit test method
authorFrancois Suter <francois@typo3.org>
Tue, 14 Jun 2011 11:31:49 +0000 (13:31 +0200)
committerFrancois Suter <francois@typo3.org>
Tue, 14 Jun 2011 11:37:45 +0000 (13:37 +0200)
The new Scheduler module unit test class uses the assertType() method
from phpUnit, which is deprecated. Replace it with
assertInternalType() as recommended by phpUnit.

Change-Id: I268a14c6b4cd4f9e24eab67d70adcc8e968fba6c
Reviewed-on: http://review.typo3.org/2735
Reviewed-by: Francois Suter
Tested-by: Francois Suter
typo3/sysext/scheduler/tests/class.tx_scheduler_moduleTest.php

index 0cb3b45..a5a2246 100644 (file)
@@ -113,7 +113,7 @@ class tx_scheduler_ModuleTest extends tx_phpunit_testcase {
        public function checkDateWithStrtotimeValues($strToTimeValue, $expectedTimestamp) {
                $checkDateResult = $this->testObject->checkDate($strToTimeValue);
 
-                       // We use assertLessThan here, because we test with relatve values (eg. next Thursday, now, ..)
+                       // We use assertLessThan here, because we test with relative values (eg. next Thursday, now, ..)
                        // If this tests runs over 1 seconds the test will fail if we use assertSame / assertEquals
                        // With assertLessThan the tests could run 0 till 3 seconds ($delta = 4)
                $delta = 4;
@@ -122,7 +122,7 @@ class tx_scheduler_ModuleTest extends tx_phpunit_testcase {
                        ($checkDateResult - $expectedTimestamp),
                        'assertLessThan fails with value "' . $strToTimeValue . '"'
                );
-               $this->assertType(
+               $this->assertInternalType(
                        PHPUnit_Framework_Constraint_IsType::TYPE_INT,
                        $checkDateResult,
                        'assertType fails with value "' . $strToTimeValue . '"'