Skip to content

Commit f99bdf0

Browse files
committed
Add test for composer contents
1 parent 90075fd commit f99bdf0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/Unit/Detectors/PhpVersionDetectorTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,15 @@ public function testItParsesJsonVersion($expected, string $version): void
7373

7474
self::assertEquals($expected, $detected);
7575
}
76+
77+
public function testItGetsComposerFileContents(): void
78+
{
79+
$contents = app(PhpVersionDetector::class)->getComposerFileContents();
80+
81+
self::assertJson($contents);
82+
83+
$json = json_decode($contents);
84+
85+
self::assertEquals('laravel/laravel', data_get($json, 'name'));
86+
}
7687
}

0 commit comments

Comments
 (0)