mirror of
https://github.com/there4/markdown-resume.git
synced 2024-12-03 08:59:35 -05:00
Add initial travis support to the repository
This commit is contained in:
parent
fa4e2f9e15
commit
f4c5f62807
9
.travis.yml
Normal file
9
.travis.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
language: php
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- curl -s http://getcomposer.org/installer | php
|
||||||
|
- php composer.phar install --dev
|
||||||
|
|
||||||
|
php:
|
||||||
|
- 5.3
|
||||||
|
- 5.4
|
22
tests/ListCommandTest.php
Normal file
22
tests/ListCommandTest.php
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Symfony\Component\Console\Application;
|
||||||
|
use Symfony\Component\Console\Tester\CommandTester;
|
||||||
|
|
||||||
|
class ListCommandTest extends \ResumeTest
|
||||||
|
{
|
||||||
|
public function testExecute()
|
||||||
|
{
|
||||||
|
$command = $this->console->find('list');
|
||||||
|
$commandTester = new CommandTester($command);
|
||||||
|
$commandTester->execute(array(
|
||||||
|
'command' => $command->getName()
|
||||||
|
));
|
||||||
|
$this->assertRegExp('/Available commands/', $commandTester->getDisplay());
|
||||||
|
$this->assertRegExp('/Options/', $commandTester->getDisplay());
|
||||||
|
$this->assertRegExp('/list/', $commandTester->getDisplay());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* End of file ListCommandTest.php */
|
20
tests/VersionCommandTest.php
Normal file
20
tests/VersionCommandTest.php
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Symfony\Component\Console\Application;
|
||||||
|
use Symfony\Component\Console\Tester\CommandTester;
|
||||||
|
|
||||||
|
class VersionCommandTest extends \ResumeTest
|
||||||
|
{
|
||||||
|
public function testExecute()
|
||||||
|
{
|
||||||
|
$command = $this->console->find('version');
|
||||||
|
$commandTester = new CommandTester($command);
|
||||||
|
$commandTester->execute(array(
|
||||||
|
'command' => $command->getName()
|
||||||
|
));
|
||||||
|
$this->assertEquals($this->console->project->version, trim($commandTester->getDisplay()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* End of file VersionCommandTest.php */
|
23
tests/bootstrap.php
Normal file
23
tests/bootstrap.php
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$app = require __DIR__ . '/../vendor/autoload.php';
|
||||||
|
$app->add('Resume', __DIR__ . '/../src');
|
||||||
|
|
||||||
|
use Resume\Cli\Resume;
|
||||||
|
|
||||||
|
class ResumeTest extends \PHPUnit_Framework_TestCase
|
||||||
|
{
|
||||||
|
|
||||||
|
public $console;
|
||||||
|
|
||||||
|
public function setUp()
|
||||||
|
{
|
||||||
|
$templatePath = realpath(__DIR__ . '/../templates/');
|
||||||
|
$consoleTemplatePath = realpath(__DIR__ . '/../src/Resume/Templates');
|
||||||
|
$project = json_decode(file_get_contents(__DIR__ . '/../composer.json'));
|
||||||
|
$this->console = new Resume();
|
||||||
|
$this->console->initialize($templatePath, $consoleTemplatePath, $project);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* End file bootstrap.php */
|
Loading…
x
Reference in New Issue
Block a user