Example #1
0
 /**
  * @test
  * @group pmc
  */
 public function testOn()
 {
     $mock = $this->getMockBuilder('\\Bronto\\DataObject')->setMethods(array('getCalled'))->getMock();
     $request = new Request('GET', 'http://google.com', new \Bronto\DataObject());
     $request->on('event', function ($mock) {
         $mock->getCalled();
     });
     $mock->expects($this->once())->method('getCalled')->will($this->returnSelf());
     $request->event($mock);
 }