Exemplo n.º 1
0
 /**
  * When called with a different object with different class will throw an exception
  */
 public function testWhenCalledWithADifferentObjectWithDifferentClassWillThrowAnException()
 {
     $labelValue = 'testing';
     $labelValueTwo = 'notTesting';
     $label = new Label($labelValue);
     $labelTwo = new \stdClass();
     $labelTwo->value = $labelValueTwo;
     try {
         $label->equals($labelTwo);
     } catch (\PHPUnit_Framework_Error $e) {
         static::assertStringStartsWith('Argument 1 passed to Xqddd\\Notifications\\Label::equals() must be an instance of Xqddd\\Notifications\\Label,', $e->getMessage());
         static::assertEquals(4096, $e->getCode());
     }
 }