77 * @copyright 2005
88 */
99
10- require_once 'PHPUnit/Framework/TestCase.php ' ;
10+ // As we want to run on PHP < 7.1,
11+ // we can't use return type declaration in fixtures.
12+ // Therefore we use PHPUnitPolyFills snakecase fixtures set_up/tear_down
13+ // instead of setUp/tearDown.
14+ // See https://github.com/Yoast/PHPUnit-Polyfills?tab=readme-ov-file#option-1-yoastphpunitpolyfillstestcasestestcase
15+ use Yoast \PHPUnitPolyfills \TestCases \TestCase ;
16+
1117require_once 'Image/Color.php ' ;
1218
13- class ColorTest extends PHPUnit_Framework_TestCase {
19+ class ColorTest extends Yoast \ PHPUnitPolyfills \ TestCases \TestCase {
1420 var $ color ;
1521
1622
17- function setUp () {
23+ function set_up () {
1824 $ this ->color = new Image_Color ();
1925 }
20- function tearDown () {
26+ function tear_down () {
2127 unset($ this ->color );
2228 }
2329
@@ -37,13 +43,13 @@ function testSetWebsafe() {
3743 function testGetGetRange_DefaultParam () {
3844 $ this ->color ->setColors ('#ffffff ' , '#000000 ' );
3945 $ result = $ this ->color ->getRange ();
40- $ this ->assertInternalType ( ' array ' , $ result );
46+ $ this ->assertIsArray ( $ result );
4147 $ this ->assertEquals (2 , count ($ result ));
4248 }
4349 function testGetGetRange_Param5 () {
4450 $ this ->color ->setColors ('#ffffff ' , '#000000 ' );
4551 $ result = $ this ->color ->getRange (5 );
46- $ this ->assertInternalType ( ' array ' , $ result );
52+ $ this ->assertIsArray ( $ result );
4753 $ this ->assertEquals (5 , count ($ result ));
4854 }
4955
0 commit comments