[TASK] Replace assertion method to use dedicated method 19/44819/4
authorWouter Wolters <typo3@wouterwolters.nl>
Fri, 20 Nov 2015 11:59:45 +0000 (12:59 +0100)
committerAndreas Fernandez <typo3@scripting-base.de>
Fri, 20 Nov 2015 13:54:32 +0000 (14:54 +0100)
PHPUnit assertion method calls like "->assertSame(true, $foo)"
should be written with dedicated method like "->assertTrue($foo)".

Resolves: #71722
Releases: master
Change-Id: I088b192eedd2e2788d590eae7477bef68ae69115
Reviewed-on: https://review.typo3.org/44819
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/extbase/Tests/Unit/Property/TypeConverter/BooleanConverterTest.php
typo3/sysext/saltedpasswords/Tests/Unit/Evaluation/EvaluatorTest.php

index 7248393..e32dc30 100644 (file)
@@ -61,7 +61,7 @@ class BooleanConverterTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     public function convertFromCastsSourceStringToBoolean()
     {
         $source = 'true';
-        $this->assertSame(true, $this->converter->convertFrom($source, 'boolean'));
+        $this->assertTrue($this->converter->convertFrom($source, 'boolean'));
     }
 
     /**
@@ -70,6 +70,6 @@ class BooleanConverterTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     public function convertFromCastsNumericSourceStringToBoolean()
     {
         $source = '1';
-        $this->assertSame(true, $this->converter->convertFrom($source, 'boolean'));
+        $this->assertTrue($this->converter->convertFrom($source, 'boolean'));
     }
 }
index a73a312..686e69b 100644 (file)
@@ -73,7 +73,7 @@ class EvaluatorTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         $isSet = null;
         $originalPassword = 'M$P$CibIRipvLfaPlaaeH8ifu9g21BrPjp.';
         $saltedPassword = $this->subject->evaluateFieldValue($originalPassword, '', $isSet);
-        $this->assertSame(null, $isSet);
+        $this->assertNull($isSet);
         $this->assertSame($originalPassword, $saltedPassword);
     }
 }