Skip to content

Commit b0efabd

Browse files
author
Mike Fisher
committed
Fix task aliasing and command spec
1 parent 1f5a30a commit b0efabd

3 files changed

Lines changed: 20 additions & 20 deletions

File tree

composer.lock

Lines changed: 16 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/Task/Console/Command/CommandSpec.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use PhpSpec\ObjectBehavior;
66
use Task\Plugin\Console\Output\Output;
7+
use Task\Plugin\Console\Output\ProxyOutput;
78
use Task\Console\Command\Command;
89
use Task\Project;
910
use Symfony\Component\Console\Helper\HelperSet;
@@ -24,7 +25,7 @@ function it_is_initializable()
2425
$this->shouldHaveType('Task\Console\Command\Command');
2526
}
2627

27-
function it_should_assign_input_and_output(InputInterface $input, OutputInterface $output)
28+
function it_should_assign_input_and_output(InputInterface $input, Output $output)
2829
{
2930
$this->setCode(function () {});
3031
$this->run($input, $output);
@@ -33,7 +34,7 @@ function it_should_assign_input_and_output(InputInterface $input, OutputInterfac
3334
$this->getOutput()->shouldReturn($output);
3435
}
3536

36-
function it_should_run_a_task_on_demand(Project $project, HelperSet $helperSet, Command $command, InputInterface $input, OutputInterface $output)
37+
function it_should_run_a_task_on_demand(Project $project, HelperSet $helperSet, Command $command, InputInterface $input, Output $output)
3738
{
3839
$project->get('test')->willReturn($command);
3940
$this->setIO($input, $output);

src/Project.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public function addTask()
164164
#
165165
if ($work instanceof BaseCommand) {
166166
if ($name) {
167-
$work->setAliases($work->getAliases() + [$name]);
167+
$work->setName($name);
168168
}
169169
$task = $work;
170170
} else {

0 commit comments

Comments
 (0)