|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* MageSpec |
|
4
|
|
|
* |
|
5
|
|
|
* NOTICE OF LICENSE |
|
6
|
|
|
* |
|
7
|
|
|
* This source file is subject to the MIT License, that is bundled with this |
|
8
|
|
|
* package in the file LICENSE. |
|
9
|
|
|
* It is also available through the world-wide-web at this URL: |
|
10
|
|
|
* |
|
11
|
|
|
* http://opensource.org/licenses/MIT |
|
12
|
|
|
* |
|
13
|
|
|
* If you did not receive a copy of the license and are unable to obtain it |
|
14
|
|
|
* through the world-wide-web, please send an email |
|
15
|
|
|
* to <[email protected]> so we can send you a copy immediately. |
|
16
|
|
|
* |
|
17
|
|
|
* @category MageTest |
|
18
|
|
|
* @package PhpSpec_MagentoExtension |
|
19
|
|
|
* |
|
20
|
|
|
* @copyright Copyright (c) 2012-2013 MageTest team and contributors. |
|
21
|
|
|
*/ |
|
22
|
|
|
namespace MageTest\PhpSpec\MagentoExtension\Extension; |
|
23
|
|
|
|
|
24
|
|
|
|
|
25
|
|
|
use MageTest\PhpSpec\MagentoExtension\Console\Command\DescribeBlockCommand; |
|
26
|
|
|
use MageTest\PhpSpec\MagentoExtension\Console\Command\DescribeControllerCommand; |
|
27
|
|
|
use MageTest\PhpSpec\MagentoExtension\Console\Command\DescribeHelperCommand; |
|
28
|
|
|
use MageTest\PhpSpec\MagentoExtension\Console\Command\DescribeModelCommand; |
|
29
|
|
|
use PhpSpec\ServiceContainer; |
|
30
|
|
|
|
|
31
|
|
|
class CommandAssembler implements Assembler |
|
32
|
|
|
{ |
|
33
|
|
|
/** |
|
34
|
|
|
* @param ServiceContainer $container |
|
35
|
|
|
*/ |
|
36
|
|
|
public function build(ServiceContainer $container) |
|
37
|
|
|
{ |
|
38
|
|
|
$container->setShared('console.commands.describe_model', function () use ($container) { |
|
39
|
|
|
return new DescribeModelCommand($container); |
|
40
|
|
|
}); |
|
41
|
|
|
|
|
42
|
|
|
$container->setShared('console.commands.describe_block', function () use ($container) { |
|
43
|
|
|
return new DescribeBlockCommand($container); |
|
44
|
|
|
}); |
|
45
|
|
|
|
|
46
|
|
|
$container->setShared('console.commands.describe_helper', function () use ($container) { |
|
47
|
|
|
return new DescribeHelperCommand($container); |
|
48
|
|
|
}); |
|
49
|
|
|
|
|
50
|
|
|
$container->setShared('console.commands.describe_controller', function () use ($container) { |
|
51
|
|
|
return new DescribeControllerCommand($container); |
|
52
|
|
|
}); |
|
53
|
|
|
} |
|
54
|
|
|
} |
|
55
|
|
|
|