/** * @test */ public function insertCheckResultAndCheckThatAllParamsPassedCorrectly() { $expectedIndexId = __LINE__; $expectedValues = array('testValue' . __LINE__, 'testValue' . __LINE__); $expectedResult = __LINE__; $this->_writeDriverMock->executeInsertResult = $expectedResult; $result = $this->_adapter->insert($expectedIndexId, $expectedValues); $this->assertEquals($expectedResult, $result); $this->assertEquals($expectedIndexId, $this->_writeDriverMock->lastCallParams[0]); $this->assertEquals($expectedValues, $this->_writeDriverMock->lastCallParams[1]); }
/** * @test * @expectedException Ext_HandlerSocket_Adapter_Exception */ public function setDatabaseWithEmptyDatabase() { $this->_adapter->setDatabase(''); }