public function testListCheckouts() { $cc = new ConcurrencyCheck('CCUnitTest', self::$users['user1']->user); $cc->checkout(1337); $cc->checkout(1338); $output = $cc->listCheckouts(); $this->assertTrue($output[1337] && $output[1338], "Current checkouts are present"); $this->assertEquals(self::$users['user1']->user->getId(), $output[1337]['cc_user'], "User matches"); $this->assertTrue(array_key_exists('cc_expiration', $output[1337]), "Expiration exists"); $this->assertTrue($output[1337]['mine'], "Ownership flag set"); }