コード例 #1
0
ファイル: BlogTest.php プロジェクト: khanhdeux/typo3test
 /**
  * @test
  */
 public function removePostFromObjectStorageHoldingPosts()
 {
     $post = new \Lobcher\Simpleblog\Domain\Model\Post();
     $postsObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array('detach'), array(), '', FALSE);
     $postsObjectStorageMock->expects($this->once())->method('detach')->with($this->equalTo($post));
     $this->inject($this->subject, 'posts', $postsObjectStorageMock);
     $this->subject->removePost($post);
 }