Skip to content

Commit 65f40a8

Browse files
authored
Merge pull request #27 from rafaelqueiroz/console
Create a console component
2 parents 3ea202a + 9fe5067 commit 65f40a8

File tree

4 files changed

+52
-1
lines changed

4 files changed

+52
-1
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
],
3030
"minimum-stability": "dev",
3131
"require": {
32-
"php": ">=5.4.0"
32+
"php": ">=5.4.0",
33+
"symfony/console": "^3.2"
3334
},
3435
"require-dev": {
3536
"phpunit/phpunit": "4.8.*"

jasper

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env php
2+
<?php
3+
require __DIR__ . '/vendor/autoload.php';
4+
5+
use Symfony\Component\Console\Application;
6+
use JasperPHP\JasperPHPCommand;
7+
8+
$application = new Application('PHPJasper', '1.0');
9+
$application->add(new JasperPHPCommand());
10+
$application->run();

src/JasperPHP/JasperPHPCommand.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
namespace JasperPHP;
3+
4+
use Symfony\Component\Console\Command\Command;
5+
use Symfony\Component\Console\Input\InputInterface;
6+
use Symfony\Component\Console\Output\OutputInterface;
7+
8+
class JasperPHPCommand extends Command
9+
{
10+
/**
11+
*
12+
*/
13+
protected function configure()
14+
{
15+
$this->setName('process')
16+
->setDescription('Description of process', '1.0')
17+
->setHelp('Help of process');
18+
}
19+
20+
/**
21+
*
22+
*/
23+
protected function execute(InputInterface $input, OutputInterface $output)
24+
{
25+
26+
}
27+
28+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
use PHPUnit_Framework_TestCase;
3+
4+
class JasperPHPCommandTest extends PHPUnit_Framework_TestCase
5+
{
6+
7+
public function testExecute()
8+
{
9+
10+
}
11+
12+
}

0 commit comments

Comments
 (0)