/** * @test * @group tagrepo */ public function should_create_tag_when_name_not_found() { $n_tag = new TagName('foo'); $tag = $this->tagRepo->tagOfNameOrCreate($n_tag); $this->em->clear(); $tags = $this->tagRepo->all(); $this->assertCount(3, $tags); $this->assertInstanceOf('Bakgat\\Notos\\Domain\\Model\\Descriptive\\Tag', $tag); $this->assertTrue($n_tag->equals($tag->name())); }
public function all() { return $this->tagRepo->all(); }