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


PHP PHPUnit_Framework_MockObject_MockObject::remove方法代码示例

本文整理汇总了PHP中PHPUnit_Framework_MockObject_MockObject::remove方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPUnit_Framework_MockObject_MockObject::remove方法的具体用法?PHP PHPUnit_Framework_MockObject_MockObject::remove怎么用?PHP PHPUnit_Framework_MockObject_MockObject::remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PHPUnit_Framework_MockObject_MockObject的用法示例。


在下文中一共展示了PHPUnit_Framework_MockObject_MockObject::remove方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testRemove

 public function testRemove()
 {
     $id = 'test_id';
     $this->layoutManipulator->expects($this->once())->method('remove')->with($id);
     $result = $this->layoutBuilder->remove($id);
     $this->assertSame($this->layoutBuilder, $result);
 }
开发者ID:Maksold,项目名称:platform,代码行数:7,代码来源:LayoutBuilderTest.php

示例2: findByParentAndNodeTypeRemovesRemovedNodeInRepositoryAndRespectsWorkspaceAndDimensions

 /**
  * @test
  */
 public function findByParentAndNodeTypeRemovesRemovedNodeInRepositoryAndRespectsWorkspaceAndDimensions()
 {
     $liveWorkspace = new Workspace('live');
     $nodeData = $this->getMockBuilder(NodeData::class)->disableOriginalConstructor()->getMock();
     $nodeData->expects($this->any())->method('getIdentifier')->will($this->returnValue('abcd-efgh-ijkl-mnop'));
     $nodeData->expects($this->any())->method('getPath')->will($this->returnValue('/foo/bar'));
     $nodeData->expects($this->any())->method('getDepth')->will($this->returnValue(2));
     $this->nodeDataRepository->remove($nodeData);
     $dimensions = array('persona' => array('everybody'), 'language' => array('de_DE', 'mul_ZZ'));
     $nodeData->expects($this->atLeastOnce())->method('matchesWorkspaceAndDimensions')->with($liveWorkspace, $dimensions)->will($this->returnValue(true));
     $this->nodeDataRepository->expects($this->any())->method('getNodeDataForParentAndNodeType')->will($this->returnValue(array('abcd-efgh-ijkl-mnop' => $nodeData)));
     $result = $this->nodeDataRepository->findByParentAndNodeType('/foo', null, $liveWorkspace, $dimensions);
     $this->assertCount(0, $result);
 }
开发者ID:robertlemke,项目名称:neos-development-collection,代码行数:17,代码来源:NodeDataRepositoryTest.php

示例3: removeChecksObjectType

 /**
  * @test
  * @expectedException \TYPO3\CMS\Extbase\Persistence\Exception\IllegalObjectTypeException
  */
 public function removeChecksObjectType()
 {
     $this->repository->_set('objectType', 'ExpectedObjectType');
     $this->repository->remove(new \stdClass());
 }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:9,代码来源:RepositoryTest.php

示例4: tearDown

 public function tearDown()
 {
     $this->fs->remove($this->dir);
 }
开发者ID:anime-db,项目名称:ani-db-browser-bundle,代码行数:4,代码来源:CacheResponseTest.php

示例5: removeThrowsException

 /**
  * @test
  *
  * @expectedException \BadMethodCallException
  */
 public function removeThrowsException()
 {
     $this->subject->remove(new AbstractEntity());
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:9,代码来源:AbstractEntityRepositoryTest.php


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