From 7598532cae6efb96c65e407c68e46f20290f8c5e Mon Sep 17 00:00:00 2001 From: Brian Scaturro Date: Tue, 27 Oct 2015 12:54:28 -0400 Subject: [PATCH 1/2] app spec uses getCommandName interface correctly --- specs/application.spec.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/specs/application.spec.php b/specs/application.spec.php index 92d5f2b..8695db5 100644 --- a/specs/application.spec.php +++ b/specs/application.spec.php @@ -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'; @@ -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"); }); }); From 12d17f1350f771877638cd5abff476ead8102068 Mon Sep 17 00:00:00 2001 From: Brian Scaturro Date: Tue, 27 Oct 2015 21:26:57 -0400 Subject: [PATCH 2/2] result spec uses startTest interface correctly --- specs/test-result.spec.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specs/test-result.spec.php b/specs/test-result.spec.php index 9655824..5f4f2dc 100644 --- a/specs/test-result.spec.php +++ b/specs/test-result.spec.php @@ -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"); });