本文整理汇总了PHP中Prophecy\Prophecy\ObjectProphecy::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP ObjectProphecy::delete方法的具体用法?PHP ObjectProphecy::delete怎么用?PHP ObjectProphecy::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Prophecy\Prophecy\ObjectProphecy
的用法示例。
在下文中一共展示了ObjectProphecy::delete方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deletes
/**
* @test
*/
public function deletes()
{
$file = File::create();
$this->repo->delete($file)->shouldBeCalled()->willReturn('jippikaijea');
$ret = $this->filelib->getFileRepository()->delete($file);
$this->assertEquals('jippikaijea', $ret);
}
示例2: doFlush
/**
* @test
*/
public function doFlush()
{
$this->type->delete()->shouldBeCalled();
self::assertTrue($this->cache->flushAll());
$refClass = new \ReflectionClass($this->cache);
$typeProp = $refClass->getProperty('type');
$typeProp->setAccessible(true);
$typeVal = $typeProp->getValue($this->cache);
self::assertNull($typeVal);
}
示例3: testReadAndDelete
public function testReadAndDelete()
{
$path = 'path.txt';
$output = '__CONTENTS__';
$this->prophecy->has($path)->willReturn(true);
$this->prophecy->read($path)->willReturn(['contents' => $output]);
$this->prophecy->delete($path)->willReturn(true);
$response = $this->filesystem->readAndDelete($path);
$this->assertEquals($output, $response);
}
示例4: deleteQuotesIdentifierAndDelegatesToConcreteQueryBuilder
/**
* @test
* @todo: Test with alias
*/
public function deleteQuotesIdentifierAndDelegatesToConcreteQueryBuilder()
{
$this->connection->quoteIdentifier('aTable')->shouldBeCalled()->willReturnArgument(0);
$this->concreteQueryBuilder->delete(Argument::exact('aTable'), Argument::cetera())->shouldBeCalled()->willReturn($this->subject);
$this->subject->delete('aTable');
}
示例5: testRemove
/**
* @dataProvider permissionProvider
*/
public function testRemove(Requester $requester, Resource $resource, Permission $permission, $cacheId)
{
$this->cache->delete($cacheId)->shouldBeCalled();
$this->permissionBuffer->remove($permission);
}
示例6: testDelete
/**
*/
public function testDelete()
{
$id = 1;
$this->fertilizerObjectManager->delete($id)->shouldBeCalledTimes(1);
$this->handler->delete($id);
}
示例7: testDelete
/**
*/
public function testDelete()
{
$id = 1;
$this->repository->delete($id)->shouldBeCalledTimes(1);
$this->manager->delete($id);
}