diff --git a/test/ComposerRequireCheckerTest/Cli/CheckCommandTest.php b/test/ComposerRequireCheckerTest/Cli/CheckCommandTest.php index 5b5d19c9..929f0871 100644 --- a/test/ComposerRequireCheckerTest/Cli/CheckCommandTest.php +++ b/test/ComposerRequireCheckerTest/Cli/CheckCommandTest.php @@ -153,6 +153,15 @@ public function testSourceFileThatUsesDevDependency(): void ); } + public function testAutoloadedFiles(): void + { + $this->commandTester->execute([ + 'composer-json' => dirname(__DIR__, 2) . '/fixtures/autoloadedFiles/composer.json', + ]); + + self::assertSame(Command::SUCCESS, $this->commandTester->getStatusCode()); + } + public function testNoUnknownSymbolsFound(): void { $this->commandTester->execute([ diff --git a/test/fixtures/autoloadedFiles/composer.json b/test/fixtures/autoloadedFiles/composer.json new file mode 100644 index 00000000..cb459f94 --- /dev/null +++ b/test/fixtures/autoloadedFiles/composer.json @@ -0,0 +1,6 @@ +{ + "name": "example/library", + "autoload": { + "files": ["src/include.php"] + } +} diff --git a/test/fixtures/autoloadedFiles/src/include.php b/test/fixtures/autoloadedFiles/src/include.php new file mode 100644 index 00000000..fbed2896 --- /dev/null +++ b/test/fixtures/autoloadedFiles/src/include.php @@ -0,0 +1,5 @@ +