_client = 'dummy'; $this->_options = array('option1' => 1); $this->_plugin = new MyPlugin(); $this->_plugin->init($this->_client, $this->_options); } public function testConstructor() { $this->assertEquals( $this->_client, $this->_plugin->getClient() ); $this->assertEquals( $this->_options, $this->_plugin->getOptions() ); } public function testEventHooksEmpty() { $this->assertEquals(null, $this->_plugin->preCreateRequest(null)); $this->assertEquals(null, $this->_plugin->postCreateRequest(null,null)); $this->assertEquals(null, $this->_plugin->preExecuteRequest(null)); $this->assertEquals(null, $this->_plugin->postExecuteRequest(null,null)); $this->assertEquals(null, $this->_plugin->preExecute(null)); $this->assertEquals(null, $this->_plugin->postExecute(null,null)); $this->assertEquals(null, $this->_plugin->preCreateResult(null,null)); $this->assertEquals(null, $this->_plugin->postCreateResult(null,null,null)); $this->assertEquals(null, $this->_plugin->preCreateQuery(null,null)); $this->assertEquals(null, $this->_plugin->postCreateQuery(null,null,null)); } } class MyPlugin extends Solarium_Plugin_Abstract{ public function getClient() { return $this->_client; } }