The benefit of using count() is that the test would still succeed if
the return vfalue is not an array, but an iterable object. It seems
this is not needed.
Change-Id: I23529f6990aebe0cce86e236a21820fe74993204
unset( $data[0]['query']['watchlist'][$index] );
}
}
unset( $data[0]['query']['watchlist'][$index] );
}
}
- $this->assertSame( 0, count( $data[0]['query']['watchlist'] ) );
+ $this->assertSame( [], $data[0]['query']['watchlist'] );
$asycList[0](); // run the refresh callback
$asycList = [];
$this->assertEquals( 2, $wasSet, "Value calculated at later time" );
$asycList[0](); // run the refresh callback
$asycList = [];
$this->assertEquals( 2, $wasSet, "Value calculated at later time" );
- $this->assertSame( 0, count( $asycList ), "No deferred refreshes added." );
+ $this->assertSame( [], $asycList, "No deferred refreshes added." );
$v = $cache->getWithSetCallback( $key, 300, $func, $opts );
$this->assertEquals( $value, $v, "New value stored" );
$v = $cache->getWithSetCallback( $key, 300, $func, $opts );
$this->assertEquals( $value, $v, "New value stored" );
- $this->assertSame( 0, count( $priv->requests ) );
+ $this->assertSame( [], $priv->requests );
$this->assertArrayNotHasKey( $backend->getId(), $manager->allSessionBackends );
$this->assertArrayHasKey( $backend->getId(), $manager->allSessionIds );
}
$this->assertArrayNotHasKey( $backend->getId(), $manager->allSessionBackends );
$this->assertArrayHasKey( $backend->getId(), $manager->allSessionIds );
}