Exemplo n.º 1
0
 public function testExtension()
 {
     $extendable = new extendable();
     $this->assertNull($extendable->___get('x'));
     $extension = new extensionSample();
     $extendable->extend($extension);
     $reflection = new ReflectionObject($extendable);
     //$method = $reflection->getMethod('method');
     //$this->assertTrue(is_object($method));
     $this->assertEquals(1, $extendable->___get('x'));
     $this->assertEquals(2, $extendable->method());
 }