diff --git a/test/Generator/MethodGeneratorTest.php b/test/Generator/MethodGeneratorTest.php index e4916596..cdb69667 100644 --- a/test/Generator/MethodGeneratorTest.php +++ b/test/Generator/MethodGeneratorTest.php @@ -375,4 +375,18 @@ public function testFromByReferenceMethodReflection() self::assertStringMatchesFormat('%Apublic function & byRefReturn()%A', $methodGenerator->generate()); } + + + public function testClearBodyIndentation() + { + $class = new \ReflectionClass(MethodGenerator::class); + $method = $class->getMethod('clearBodyIndention'); + $method->setAccessible(true); + + + $testMethod = '/** @return bool */ public function someMethod() { return false; }'; + $clearedMethod = $method->invokeArgs( null, ['\t\t' . $testMethod]); + + $this->assertEquals($testMethod, $clearedMethod); + } }