public function testDynamicExtendAndMethodOnClass() { $subject = new ExampleExtendableClass(); $subject->extendClassWith('ExampleBehaviorClass2'); $subject->addDynamicMethod('getOriginalFoo', 'getFoo', 'ExampleBehaviorClass1'); $this->assertTrue($subject->isClassExtendedWith('ExampleBehaviorClass1')); $this->assertTrue($subject->isClassExtendedWith('ExampleBehaviorClass2')); $this->assertEquals('bar', $subject->getFoo()); $this->assertEquals('foo', $subject->getOriginalFoo()); }