/** * {@inheritdoc} */ public function deleteItem($itemId, array $shopIds = null) { if ($itemId === 0) { return; } $this->storageManager->removeRecord($itemId, $shopIds); }
/** * Test getChunk action. */ public function testSyncStorageGetChunk() { $valueMap = [[1, null, null, [1]], [2, null, null, [1, 2]], [0, null, null, null]]; $this->storageManager->expects($this->exactly(count($valueMap) - 1))->method('getNextRecords')->will($this->returnValueMap($valueMap)); foreach ($valueMap as $record) { $records = $this->service->getChunk($record[0], $record[1], $record[2]); $this->assertEquals(count($record[3]), count($records)); } }