Skip to content

Commit

Permalink
Adapted test case for new feature
Browse files Browse the repository at this point in the history
  • Loading branch information
MCStreetguy committed Sep 9, 2019
1 parent a065b61 commit 85e7b3f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/ComposerJsonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
use MCStreetguy\ComposerParser\ComposerJson;
use MCStreetguy\ComposerParser\Json\Autoload;
use MCStreetguy\ComposerParser\Service\PackageMap;
use MCStreetguy\ComposerParser\Json\Repository;
use PHPUnit\Framework\TestCase;

class ComposerJsonTest extends TestCase
Expand Down Expand Up @@ -70,6 +71,13 @@ public function testCanGetValidData(ComposerJson $composerJson)
$this->assertCount(1, $authors);

$this->assertInstanceOf(Autoload::class, $composerJson->getAutoload());
$this->assertInstanceOf(Autoload::class, $composerJson->getAutoloadDev());

$repositories = $composerJson->getRepositories();
$this->assertIsArray($repositories);
$this->assertCount(1, $repositories);
$this->assertArrayHasKey('packagist.org', $repositories);
$this->assertInstanceOf(Repository::class, $repositories['packagist.org']);

$require = $composerJson->getRequire();
$this->assertInstanceOf(PackageMap::class, $require);
Expand Down

0 comments on commit 85e7b3f

Please sign in to comment.