Skip to content

Commit

Permalink
Merge pull request #167 from brianium/bugfix-command-name-input
Browse files Browse the repository at this point in the history
spec should use getCommandName interface correctly
  • Loading branch information
brianium committed Oct 28, 2015
2 parents 09fc7ec + 12d17f1 commit ff91db4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion specs/application.spec.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use Peridot\Core\Suite;
use Peridot\Runner\Runner;
use Peridot\Runner\RunnerInterface;
use Symfony\Component\Console\Input\ArgvInput;

describe('Application', function() {
include __DIR__ . '/shared/application-tester.php';
Expand Down Expand Up @@ -35,7 +36,8 @@

describe('->getCommandName()', function() {
it('should return "peridot"', function() {
assert($this->application->getCommandName() == "peridot", "command name should be peridot");
$input = new ArgvInput(['foo.php', 'bar'], $this->definition);
assert($this->application->getCommandName($input) == "peridot", "command name should be peridot");
});
});

Expand Down
3 changes: 2 additions & 1 deletion specs/test-result.spec.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
});

it('should increment the test count', function() {
$this->result->startTest();
$test = new Test('test', function () {});
$this->result->startTest($test);
assert(1 === $this->result->getTestCount(), "test count should be 1");
});

Expand Down

0 comments on commit ff91db4

Please sign in to comment.