当前位置: 首页>>代码示例>>PHP>>正文


PHP ObjectProphecy::delete方法代码示例

本文整理汇总了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);
 }
开发者ID:kankje,项目名称:xi-filelib,代码行数:10,代码来源:FileRepositoryTest.php

示例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);
 }
开发者ID:basster,项目名称:doctrine-elastica-cache,代码行数:13,代码来源:CacheTest.php

示例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);
 }
开发者ID:mechiko,项目名称:staff-october,代码行数:10,代码来源:FilesystemTests.php

示例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');
 }
开发者ID:dachcom-digital,项目名称:TYPO3.CMS,代码行数:10,代码来源:QueryBuilderTest.php

示例5: testRemove

 /**
  * @dataProvider permissionProvider
  */
 public function testRemove(Requester $requester, Resource $resource, Permission $permission, $cacheId)
 {
     $this->cache->delete($cacheId)->shouldBeCalled();
     $this->permissionBuffer->remove($permission);
 }
开发者ID:alexdpy,项目名称:acl,代码行数:8,代码来源:PermissionBufferTest.php

示例6: testDelete

 /**
  */
 public function testDelete()
 {
     $id = 1;
     $this->fertilizerObjectManager->delete($id)->shouldBeCalledTimes(1);
     $this->handler->delete($id);
 }
开发者ID:JahHub,项目名称:fertilizer,代码行数:8,代码来源:AbstractEntityHandlerTest.php

示例7: testDelete

 /**
  */
 public function testDelete()
 {
     $id = 1;
     $this->repository->delete($id)->shouldBeCalledTimes(1);
     $this->manager->delete($id);
 }
开发者ID:JahHub,项目名称:fertilizer,代码行数:8,代码来源:ObjectManagerTest.php


注:本文中的Prophecy\Prophecy\ObjectProphecy::delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。