createMock(Environment::class); $environment->expects(self::once()) ->method('absoluteRelativePath') ->with('') ->willReturn($dir); $environment->expects(self::once()) ->method('getDirName') ->willReturn('subdir'); $files = $this->globSearcher->globSearch($environment, '*'); self::assertCount(7, $files); $expected = [ '/orphaned/file', '/index', '/subdir/toctree', '/wildcards/bugfix1', '/wildcards/feature1', '/wildcards/feature2', '/wildcards/index', ]; sort($expected); sort($files); self::assertSame($expected, $files); } protected function setUp(): void { $this->globSearcher = new GlobSearcher(); } }