-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
88bc489
commit 52d9ccf
Showing
2 changed files
with
13 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
SGVsbG8gV29ybGQh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,26 @@ | ||
<?php | ||
|
||
namespace Pantheon\Terminus\UnitTests\Commands; | ||
|
||
use Codeception\Specify; | ||
use Pantheon\Terminus\Commands\ArtCommand; | ||
use Pantheon\Terminus\Config; | ||
|
||
use Pantheon\Terminus\Tests\CommandTestCase; | ||
use Symfony\Component\Console\Output\BufferedOutput; | ||
|
||
/** | ||
* Testing class for Pantheon\Terminus\Terminus | ||
*/ | ||
class ArtCommandTest extends \PHPUnit_Framework_TestCase | ||
class ArtCommandTest extends CommandTestCase | ||
{ | ||
/** | ||
* @var ArtCommand | ||
*/ | ||
private $command; | ||
|
||
public function setUp() | ||
{ | ||
$config = new Config([]); | ||
$this->command = new ArtCommand(); | ||
$this->command->setConfig($config); | ||
parent::setUp(); | ||
$this->setInput(['command' => 'art', 'name' => 'hello']); | ||
} | ||
|
||
public function testArtPrintsArt() | ||
{ | ||
assertEquals(file_get) | ||
$this->assertEquals('Hello World!', $this->runCommand()->getOutput()); | ||
} | ||
|
||
public function testArtRejectsNonExistantFiles() | ||
{ | ||
$this->setInput(['command' => 'art', 'name' => 'foo']); | ||
$this->assertEquals('Not a valid work of art!', $this->runCommand()->getOutput()); | ||
} | ||
} |