public function testCreateResultPostPlugin() { $query = new SelectQuery(); $response = new Response('', array('HTTP 1.0 200 OK')); $result = $this->client->createResult($query, $response); $expectedEvent = new PostCreateResultEvent($query, $response, $result); $expectedEvent->setDispatcher($this->client->getEventDispatcher()); $expectedEvent->setName(Events::POST_CREATE_RESULT); $observer = $this->getMock('Solarium\\Core\\Plugin\\Plugin', array('postCreateResult')); $observer->expects($this->once())->method('postCreateResult')->with($this->equalTo($expectedEvent)); $this->client->registerPlugin('testplugin', $observer); $this->client->getEventDispatcher()->addListener(Events::POST_CREATE_RESULT, array($observer, 'postCreateResult')); $this->client->createResult($query, $response); }