Phergie_Plugin_TestCase::assertEmitsEvent PHP Method

assertEmitsEvent() protected method

Modifies the event handler to include an expectation of an event being added by the plugin being tested. Note that this must be called BEFORE executing the plugin code intended to initiate the event.
protected assertEmitsEvent ( string $type, array $args = [] ) : void
$type string Event type
$args array Optional enumerated array of event arguments
return void
    protected function assertEmitsEvent($type, array $args = array())
    {
        $this->events->expects($this->at(0))->method('addEvent')->with($this->plugin, $type, $args);
    }