/** * @param \Domain\Core\Tag $tag * * @return bool */ public function persist($tag) { echo $tag->getTag(); return true; }
/** * Test for sure that the persist method is called * * @test */ public function testPersist() { $this->dummyTagEntity->expects($this->once())->method('persist')->willReturn(true); $item = new Tag($this->dummyTagEntity, '', 'tag test'); $this->assertTrue($item->persist(), 'The persist method will return true'); }