-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathExemplifyExtension.php
More file actions
29 lines (25 loc) · 966 Bytes
/
ExemplifyExtension.php
File metadata and controls
29 lines (25 loc) · 966 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
namespace RMiller\BehatSpec\Extension\ExemplifyExtension;
use PhpSpec\Extension;
use PhpSpec\ServiceContainer;
use RMiller\BehatSpec\Extension\ExemplifyExtension\Command\ExemplifyCommand;
use RMiller\BehatSpec\Extension\ExemplifyExtension\Generator\SpecificationMethodGenerator;
class ExemplifyExtension implements Extension
{
/**
* @param ServiceContainer $container
* @param array $params
*/
public function load(ServiceContainer $container, array $params)
{
$container->define('code_generator.generators.specification_method', function (ServiceContainer $c) {
return new SpecificationMethodGenerator(
$c->get('console.io'),
$c->get('code_generator.templates')
);
}, ['code_generator.generators']);
$container->define('console.commands.exemplify', function () {
return new ExemplifyCommand();
}, ['console.commands']);
}
}