We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a87833c commit 24800dfCopy full SHA for 24800df
tests/src/NsDirUtilTest.php
@@ -0,0 +1,23 @@
1
+<?php
2
+
3
+declare(strict_types = 1);
4
5
+namespace Ock\ClassFilesIterator\Tests;
6
7
+use Ock\ClassFilesIterator\NsDirUtil;
8
+use PHPUnit\Framework\TestCase;
9
10
+class NsDirUtilTest extends TestCase {
11
12
+ use ExceptionTestTrait;
13
14
+ public function testTerminateNamespace(): void {
15
+ $f = NsDirUtil::terminateNamespace(...);
16
+ $this->assertSame('Acme\Zoo\Animal\\', $f('Acme\Zoo\Animal'));
17
+ $this->assertSame('Acme\\', $f('Acme'));
18
+ $this->assertSame('', $f(''));
19
+ $this->callAndAssertException(\InvalidArgumentException::class, fn () => $f('Acme\\Zoo\\Animal\\'));
20
+ $this->callAndAssertException(\InvalidArgumentException::class, fn () => $f('\\Acme\\Zoo\\Animal'));
21
+ }
22
23
+}
0 commit comments