Skip to content

Commit

Permalink
Merge pull request #450 from cweagans/command-provider-test-coverage
Browse files Browse the repository at this point in the history
Add test coverage for command provider
  • Loading branch information
cweagans authored Feb 7, 2023
2 parents 41572de + 5b32430 commit caeb55f
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/unit/CommandProviderTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace cweagans\Composer\Tests\Unit;

use Codeception\Test\Unit;
use Composer\Command\BaseCommand;
use Composer\Composer;
use Composer\Config;
use cweagans\Composer\Capability\CommandProvider;

class CommandProviderTest extends Unit
{
public function testGetCommands()
{
$composer = new Composer();
$composer->setConfig(new Config());

$commandProvider = new CommandProvider();

$commands = $commandProvider->getCommands();
$this->assertCount(2, $commands);
$this->assertInstanceOf(BaseCommand::class, $commands[0]);
$this->assertInstanceOf(BaseCommand::class, $commands[1]);
}
}

0 comments on commit caeb55f

Please sign in to comment.