public function testCategory() { $category = $this->getMock('JLM\\ProductBundle\\Model\\ProductCategoryInterface'); $this->assertSame($this->entity, $this->entity->setCategory($category)); $this->assertSame($category, $this->entity->getCategory()); }