@@ -37,6 +37,7 @@ public function testCanBeClass(): void
3737 $ this ->assertFalse ($ target ->isNamespace ());
3838
3939 $ this ->assertSame ($ className , $ target ->className ());
40+ $ this ->assertSame ($ className , $ target ->asString ());
4041 }
4142
4243 public function testCanBeClassesThatExtendClass (): void
@@ -53,6 +54,7 @@ public function testCanBeClassesThatExtendClass(): void
5354 $ this ->assertFalse ($ target ->isNamespace ());
5455
5556 $ this ->assertSame ($ className , $ target ->className ());
57+ $ this ->assertSame ($ className , $ target ->asString ());
5658 }
5759
5860 public function testCanBeClassesThatImplementInterface (): void
@@ -69,6 +71,7 @@ public function testCanBeClassesThatImplementInterface(): void
6971 $ this ->assertFalse ($ target ->isNamespace ());
7072
7173 $ this ->assertSame ($ interfaceName , $ target ->interfaceName ());
74+ $ this ->assertSame ($ interfaceName , $ target ->asString ());
7275 }
7376
7477 public function testCanBeFunction (): void
@@ -85,6 +88,7 @@ public function testCanBeFunction(): void
8588 $ this ->assertFalse ($ target ->isNamespace ());
8689
8790 $ this ->assertSame ($ functionName , $ target ->functionName ());
91+ $ this ->assertSame ($ functionName , $ target ->asString ());
8892 }
8993
9094 public function testCanBeMethod (): void
@@ -103,6 +107,7 @@ public function testCanBeMethod(): void
103107
104108 $ this ->assertSame ($ className , $ target ->className ());
105109 $ this ->assertSame ($ methodName , $ target ->methodName ());
110+ $ this ->assertSame ($ className . ':: ' . $ methodName , $ target ->asString ());
106111 }
107112
108113 public function testCanBeNamespace (): void
@@ -119,5 +124,6 @@ public function testCanBeNamespace(): void
119124 $ this ->assertTrue ($ target ->isNamespace ());
120125
121126 $ this ->assertSame ($ namespace , $ target ->namespace ());
127+ $ this ->assertSame ($ namespace , $ target ->asString ());
122128 }
123129}
0 commit comments