/** * {@inheritdoc} */ public function replace(array $urls) { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'replace'); if (!$pluginInfo) { return parent::replace($urls); } else { return $this->___callPlugins('replace', func_get_args(), $pluginInfo); } }
public function testDeleteByData() { $data = ['col1' => 'val1', 'col2' => 'val2']; $this->adapter->expects($this->any())->method('quoteIdentifier')->will($this->returnArgument(0)); $this->select->expects($this->at(1))->method('where')->with('col1 IN (?)', 'val1'); $this->select->expects($this->at(2))->method('where')->with('col2 IN (?)', 'val2'); $this->select->expects($this->at(3))->method('deleteFromSelect')->with('table_name')->will($this->returnValue('sql delete query')); $this->resource->expects($this->any())->method('getTableName')->with(DbStorage::TABLE_NAME)->will($this->returnValue('table_name')); $this->adapter->expects($this->once())->method('query')->with('sql delete query'); $this->storage->deleteByData($data); }