Skip to content

Commit 402ff3f

Browse files
committed
Fix broken test in PHP 5.3.
1 parent 5f9dc69 commit 402ff3f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/test-cli.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,12 @@ function test_string_cache() {
6868
'decolorized' => $string,
6969
);
7070

71+
$real_cache = \cli\Colors::getStringCache();
72+
7173
// Test that the cache value exists
72-
$this->assertTrue( isset( \cli\Colors::getStringCache()[ md5( $string_with_color ) ] ) );
74+
$this->assertTrue( isset( $real_cache[ md5( $string_with_color ) ] ) );
7375

7476
// Test that the cache value is correctly set
75-
$this->assertEquals( $test_cache, \cli\Colors::getStringCache()[ md5( $string_with_color ) ] );
77+
$this->assertEquals( $test_cache, $real_cache[ md5( $string_with_color ) ] );
7678
}
7779
}

0 commit comments

Comments
 (0)