Пример #1
0
 public function testInvalidHasGetterCall()
 {
     $mock = new StrictBean('John', 'Dunbar', 'white', false);
     $bean = new Bean($mock, true);
     $this->setExpectedException('\\InvalidArgumentException', "The 'property' argument must be a string or a BeanProperty object.");
     $bean = new Bean($mock);
     $getter = $bean->hasGetter(null);
 }
Пример #2
0
 public function testHasGetterByBeanProperty()
 {
     $mock = new StrictBean('Mickael', 'Dundie', 'black', true);
     $bean = new Bean($mock);
     $property = $bean->getProperty('firstName');
     $this->assertTrue($bean->hasGetter($property) !== false);
 }