@@ -11,15 +11,14 @@ class FullyQualifiedClassNameTest extends TestCase
11
11
public function patternProvider (): array
12
12
{
13
13
return [
14
- ['Food\Vegetables\Fruits\Banana ' , 'Food\Vegetables\Fruits\Banana ' , true ],
15
- ['Food\Vegetables\Fruits\Banana ' , 'Food\Vegetables\*\Banana ' , true ],
16
- ['Food\Vegetables\Fruits\Banana ' , 'Food\Vegetables ' , true ],
14
+ ['Food\Vegetables\Fruits\Banana ' , 'Food\Vegetables\Fruits\Banana ' , true ],
15
+ ['Food\Vegetables\Fruits\Banana ' , 'Food\Vegetables\*\Banana ' , true ],
16
+ ['Food\Vegetables\Fruits\Banana ' , 'Food\Vegetables ' , true ],
17
17
['Food\Vegetables\Fruits\Banana ' , 'Food\Vegetables \\' , true ],
18
-
19
18
['Food\Vegetables\Fruits\Banana ' , 'Food\Vegetables\* ' , true ],
20
- ['Food\Vegetables\Fruits\Mango ' , '' , false ],
21
- ['Food\Veg ' , 'Food\Vegetables ' , false ],
22
- ['Food\Vegetables ' , 'Food\Veg ' , false ],
19
+ ['Food\Vegetables\Fruits\Mango ' , '' , false ],
20
+ ['Food\Veg ' , 'Food\Vegetables ' , false ],
21
+ ['Food\Vegetables ' , 'Food\Veg ' , false ],
23
22
];
24
23
}
25
24
@@ -41,6 +40,12 @@ public function test_should_throw_if_invalid_namespace_is_passed(): void
41
40
FullyQualifiedClassName::fromString ('-Gvnn ' );
42
41
}
43
42
43
+ public function test_single_letter_class_is_valid (): void
44
+ {
45
+ $ fqcn = FullyQualifiedClassName::fromString ('A ' );
46
+ $ this ->assertEquals ('A ' , $ fqcn ->className ());
47
+ }
48
+
44
49
public function test_should_return_class_name (): void
45
50
{
46
51
$ fqcn = FullyQualifiedClassName::fromString ('Food\Vegetables\Fruits\Banana ' );
0 commit comments