Skip to content

Commit ff91db4

Browse files
committed
Merge pull request #167 from brianium/bugfix-command-name-input
spec should use getCommandName interface correctly
2 parents 09fc7ec + 12d17f1 commit ff91db4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

specs/application.spec.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
use Peridot\Core\Suite;
44
use Peridot\Runner\Runner;
55
use Peridot\Runner\RunnerInterface;
6+
use Symfony\Component\Console\Input\ArgvInput;
67

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

3637
describe('->getCommandName()', function() {
3738
it('should return "peridot"', function() {
38-
assert($this->application->getCommandName() == "peridot", "command name should be peridot");
39+
$input = new ArgvInput(['foo.php', 'bar'], $this->definition);
40+
assert($this->application->getCommandName($input) == "peridot", "command name should be peridot");
3941
});
4042
});
4143

specs/test-result.spec.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
});
4343

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

0 commit comments

Comments
 (0)