X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Flibs%2Fobjectcache%2FWANObjectCacheTest.php;h=61d3785bc026c923d1e3652434796ba13c178a6d;hb=c2211946f7dd4e59faf6d759e9a78bf140699c3e;hp=7c4c9bf944e7b2a6952e78b0e252ad6e2d7a034b;hpb=fa0f6f34972c0e0f4aac24a03b3efdfc45f256f6;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php b/tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php index 7c4c9bf944..61d3785bc0 100644 --- a/tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php +++ b/tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php @@ -381,8 +381,8 @@ class WANObjectCacheTest extends PHPUnit\Framework\TestCase { $v = $cache->getWithSetCallback( $key, 30, $checkFunc, [ 'staleTTL' => 50 ] + $extOpts ); $this->assertEquals( 'xxx1', $v, "Value returned" ); - $this->assertEquals( false, $oldValReceived, "Callback got no stale value" ); - $this->assertEquals( null, $oldAsOfReceived, "Callback got no stale value" ); + $this->assertFalse( $oldValReceived, "Callback got no stale value" ); + $this->assertNull( $oldAsOfReceived, "Callback got no stale value" ); $mockWallClock += 40; $v = $cache->getWithSetCallback( @@ -397,8 +397,8 @@ class WANObjectCacheTest extends PHPUnit\Framework\TestCase { $key, 30, $checkFunc, [ 'staleTTL' => 50 ] + $extOpts ); $this->assertEquals( 'xxx3', $v, "Value still returned after expired" ); $this->assertEquals( 3, $wasSet, "Value recalculated while expired" ); - $this->assertEquals( false, $oldValReceived, "Callback got no stale value" ); - $this->assertEquals( null, $oldAsOfReceived, "Callback got no stale value" ); + $this->assertFalse( $oldValReceived, "Callback got no stale value" ); + $this->assertNull( $oldAsOfReceived, "Callback got no stale value" ); $mockWallClock = ( $priorTime - $cache::HOLDOFF_TTL - 1 ); $wasSet = 0; @@ -414,8 +414,8 @@ class WANObjectCacheTest extends PHPUnit\Framework\TestCase { ); $this->assertEquals( 'xxx1', $v, "Value returned" ); $this->assertEquals( 1, $wasSet, "Value computed" ); - $this->assertEquals( false, $oldValReceived, "Callback got no stale value" ); - $this->assertEquals( null, $oldAsOfReceived, "Callback got no stale value" ); + $this->assertFalse( $oldValReceived, "Callback got no stale value" ); + $this->assertNull( $oldAsOfReceived, "Callback got no stale value" ); $mockWallClock += $cache::TTL_HOUR; // some time passes $v = $cache->getWithSetCallback( @@ -1473,7 +1473,7 @@ class WANObjectCacheTest extends PHPUnit\Framework\TestCase { $this->assertEquals( $valueV2, $v, "Value returned" ); $this->assertEquals( 1, $wasSet, "Value regenerated" ); $this->assertEquals( false, $priorValue, "Old value not given due to old format" ); - $this->assertEquals( null, $priorAsOf, "Old value not given due to old format" ); + $this->assertNull( $priorAsOf, "Old value not given due to old format" ); $wasSet = 0; $v = $cache->getWithSetCallback( $key, 30, $funcV2, $verOpts + $extOpts );