Skip to content

Commit 14c76ec

Browse files
committed
example added
1 parent fad18f0 commit 14c76ec

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

example/bin/console

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env php
2+
<?php
3+
declare(strict_types=1);
4+
5+
require_once (__DIR__ . '/../../vendor/autoload.php');
6+
require_once (__DIR__ . '/../../tests/resources/Command/OrdinaryCommand.php');
7+
8+
use Selami\Console\ApplicationFactory;
9+
use Zend\ServiceManager\ServiceManager;
10+
11+
$container = new ServiceManager();
12+
$container->setService(
13+
'commands', [
14+
SelamiConsoleTest\Command\OrdinaryCommand::class
15+
]
16+
);
17+
$container->setService('config', ['lang' => 'English']);
18+
19+
$cli = ApplicationFactory::makeApplication($container);
20+
$cli->run();

0 commit comments

Comments
 (0)