public function testAfterGetIdentities() { $baseIdentities = ['SomeCacheId', 'AnotherCacheId']; $id = 12345; $parentIds = [1, 2, 5, 100500]; $expectedIdentities = ['SomeCacheId', 'AnotherCacheId', Product::CACHE_TAG . '_' . 1, Product::CACHE_TAG . '_' . 2, Product::CACHE_TAG . '_' . 5, Product::CACHE_TAG . '_' . 100500]; $this->product->expects($this->once())->method('getId')->will($this->returnValue($id)); $this->type->expects($this->once())->method('getParentIdsByChild')->with($id)->will($this->returnValue($parentIds)); $identities = $this->plugin->afterGetIdentities($this->product, $baseIdentities); $this->assertEquals($expectedIdentities, $identities); }