/** * @param string $table * @param array $dimensions * @param bool $isTableExist */ public function testDelete() { $index = 'index_name'; $dimensions = ['index_name_scope_3' => $this->createDimensionMock('scope', 3), 'index_name_scope_5' => $this->createDimensionMock('scope', 5), 'index_name_scope_1' => $this->createDimensionMock('scope', 1)]; $expectedTable = 'index_name_scope3_scope5_scope1'; $this->indexScopeResolver->expects($this->once())->method('resolve')->with($index, $dimensions)->willReturn($expectedTable); $position = 0; $position = $this->mockDropTable($position, $expectedTable, true); $this->target->delete($index, $dimensions); }
/** * {@inheritdoc} */ public function cleanIndex($dimensions) { $this->indexStructure->delete($this->getIndexName(), $dimensions); $this->indexStructure->create($this->getIndexName(), $dimensions); }