public function testGetCrossSellingSimilarProducts() { $productManager = $this->getMock('Sonata\\Component\\Product\\ProductManagerInterface'); $productManager->expects($this->once())->method('findInSameCollections')->will($this->returnValue(array())); $finder = new ProductFinder($productManager); $product = $this->getMock('Sonata\\Component\\Product\\ProductInterface'); $this->assertEquals(array(), $finder->getCrossSellingSimilarProducts($product)); }