gearmanTask = $this->getMock('\GearmanTask'); $this->gearmanClientCallbackCompleteEvent = new GearmanClientCallbackCompleteEvent($this->gearmanTask); } /** * Testing payload getter */ public function testGetGearmanTask() { $this->assertEquals($this->gearmanClientCallbackCompleteEvent->getGearmanTask(), $this->gearmanTask); } /** * Tests if Event extends needed classes */ public function testInstancesOf() { $this->assertInstanceOf('Symfony\Component\EventDispatcher\Event', $this->gearmanClientCallbackCompleteEvent); $this->assertInstanceOf('Mmoreram\GearmanBundle\Event\Abstracts\AbstractGearmanClientTaskEvent', $this->gearmanClientCallbackCompleteEvent); } }