public function testClearTemporaryIndexTable() { $connectionMock = $this->getMock('Magento\\Framework\\DB\\Adapter\\AdapterInterface', [], [], '', false); $this->_resourceMock->expects($this->any())->method('getConnection')->will($this->returnValue($connectionMock)); $connectionMock->expects($this->once())->method('delete')->will($this->returnSelf()); $this->model->clearTemporaryIndexTable(); }