示例#1
0
 public function testAddEventInvalid()
 {
     $adagnit = new CMService_Adagnit_Client();
     $exception = $this->catchException(function () use($adagnit) {
         $adagnit->addEvent('invalid');
     });
     $this->assertInstanceOf('CM_Exception_Invalid', $exception);
     /** @var CM_Exception_Invalid $exception */
     $this->assertSame('Unknown event type', $exception->getMessage());
     $this->assertSame(['eventType' => 'invalid'], $exception->getMetaInfo());
 }
示例#2
0
 /**
  * @expectedException CM_Exception_Invalid
  * @expectedExceptionMessage Unknown event type `invalid`
  */
 public function testAddEventInvalid()
 {
     $adagnit = new CMService_Adagnit_Client();
     $adagnit->addEvent('invalid');
 }