예제 #1
0
파일: BehaviorTest.php 프로젝트: howq/yii2
 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();
 }
예제 #2
0
<?php

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