diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/GitDeploy/Tests/Fixtures/git-deploy.json | 4 | ||||
-rw-r--r-- | tests/GitDeploy/Tests/GitDeployTest.php | 19 | ||||
-rw-r--r-- | tests/bootstrap.php | 6 |
3 files changed, 29 insertions, 0 deletions
diff --git a/tests/GitDeploy/Tests/Fixtures/git-deploy.json b/tests/GitDeploy/Tests/Fixtures/git-deploy.json new file mode 100644 index 0000000..4ca1730 --- /dev/null +++ b/tests/GitDeploy/Tests/Fixtures/git-deploy.json @@ -0,0 +1,4 @@ +{ + "mywebsite": "https://github.com/my/website.git", + "myotherwebsite": "https://github.com/my/otherwebsite.git" +} diff --git a/tests/GitDeploy/Tests/GitDeployTest.php b/tests/GitDeploy/Tests/GitDeployTest.php new file mode 100644 index 0000000..ff1bf10 --- /dev/null +++ b/tests/GitDeploy/Tests/GitDeployTest.php @@ -0,0 +1,19 @@ +<?php + +namespace GitDeploy\Tests\GitDeployTest; + +use GitDeploy\GitDeploy; + +class GitDeployTest extends \PHPUnit_Framework_TestCase +{ + protected $fixtures; + + public function __construct() { + $this->fixtures = __DIR__ . '/Fixtures/'; + } + + public function testFromFile() { + $gitdeploy = GitDeploy::fromFile($this->fixtures . 'git-deploy.json'); + $this->assertNotEmpty($gitdeploy); + } +} diff --git a/tests/bootstrap.php b/tests/bootstrap.php new file mode 100644 index 0000000..2340dac --- /dev/null +++ b/tests/bootstrap.php @@ -0,0 +1,6 @@ +<?php + +error_reporting(E_ALL); + +$loader = require __DIR__ . '/../src/bootstrap.php'; +$loader->add('GitDeploy\Test', __DIR__); |