Beispiel #1
0
 public function testCallUnknownMethod()
 {
     $bar = new BarClass();
     $behavior = new BarBehavior();
     $this->setExpectedException('yii\\base\\UnknownMethodException');
     $this->assertFalse($bar->hasMethod('nomagicBehaviorMethod'));
     $bar->attachBehavior('bar', $behavior);
     $bar->nomagicBehaviorMethod();
 }
Beispiel #2
0
<?php

echo BarClass::foo();
echo FooClass::foo();