public function testGetBodyAst() { $php = '<?php function foo() { echo "Hello world"; } '; $reflector = new FunctionReflector(new StringSourceLocator($php)); $function = $reflector->reflect('foo'); $ast = $function->getBodyAst(); $this->assertInternalType('array', $ast); $this->assertCount(1, $ast); $this->assertInstanceOf(Echo_::class, $ast[0]); }