Skip to content

Commit 1770adc

Browse files
committed
Add test for missing composer.json in PhpVersionDetectorTest
1 parent 1ad195d commit 1770adc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/Unit/Detectors/PhpVersionDetectorTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,13 @@ public function testItGetsComposerFileContents(): void
8484

8585
self::assertEquals('laravel/laravel', data_get($json, 'name'));
8686
}
87+
88+
public function testItReturnsFalseOnMissingComposerFile(): void
89+
{
90+
$this->app->setBasePath('non-existent');
91+
92+
$detected = app(PhpVersionDetector::class)->getComposerFileContents();
93+
94+
self::assertFalse($detected);
95+
}
8796
}

0 commit comments

Comments
 (0)