public function testAddTags() { $testTags = array(new Tag(self::TEST_TAG_NAME)); $collection = $this->getMock('Doctrine\\Common\\Collections\\ArrayCollection'); $collection->expects($this->once())->method('add'); $resource = $this->getMockForAbstractClass('Oro\\Bundle\\TagBundle\\Entity\\Taggable'); $resource->expects($this->once())->method('getTags')->will($this->returnValue($collection)); $this->manager->addTags($testTags, $resource); }