Skip to content

Commit 1c0f791

Browse files
committed
issue #1 - add unit test
1 parent 72234d0 commit 1c0f791

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Tests/Element/PhpClassTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,4 +254,11 @@ public function testSimpleClassPublicMethodToString()
254254

255255
$this->assertSame("class Foo\n{\n private function bar(\$bar, \$foo, \$sample)\n {\n \$foo = 1;\n }\n}", $class->toString());
256256
}
257+
258+
public function testExtendsFromNamespace()
259+
{
260+
$class = new PhpClass('Foo', false, '\\DOMDocument');
261+
262+
$this->assertSame("class Foo extends \\DOMDocument\n{\n}", $class->toString());
263+
}
257264
}

0 commit comments

Comments
 (0)