public function testDynamicMethodOnClass() { $subject = new ExampleExtendableClass(); $subject->addDynamicMethod('getFooAnotherWay', 'getFoo', 'ExampleBehaviorClass1'); $this->assertEquals('foo', $subject->getFoo()); $this->assertEquals('foo', $subject->getFooAnotherWay()); }