expectException(common_exception_Error::class); $resource = $this->prophesize('core_kernel_classes_Resource'); $owner = $this->prophesize('core_kernel_classes_Literal'); $lock = new SimpleLock($resource->reveal(), $owner->reveal(), 'epoch'); } /** * * @author Lionel Lecaque, lionel@taotesting.com * @return \oat\tao\model\lock\implementation\SimpleLock */ public function testConstruct() { $resource = $this->prophesize('core_kernel_classes_Resource'); $owner = $this->prophesize('core_kernel_classes_Resource'); $owner->getUri()->willReturn('#ownerUri'); $lock = new SimpleLock($resource->reveal(), $owner->reveal(), 'epoch'); $this->assertTrue(true); return $lock; } /** * @depends testConstruct * @author Lionel Lecaque, lionel@taotesting.com */ public function testGetOwnerId($lock) { $this->assertEquals('#ownerUri', $lock->getOwnerId()); } /** * @depends testConstruct * @author Lionel Lecaque, lionel@taotesting.com */ public function testGetCreationTime($lock) { $this->assertEquals('epoch', $lock->getCreationTime()); } }