Beispiel #1
0
 public function testMagicMethods()
 {
     $bar = new BarClass();
     $behavior = new BarBehavior();
     $this->assertFalse($bar->hasMethod('magicBehaviorMethod'));
     $bar->attachBehavior('bar', $behavior);
     $this->assertFalse($bar->hasMethod('magicBehaviorMethod', false));
     $this->assertTrue($bar->hasMethod('magicBehaviorMethod'));
     $this->assertEquals('Magic Behavior Method Result!', $bar->magicBehaviorMethod());
 }