Skip to content

Commit

Permalink
Add passing unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinleblanc committed Sep 14, 2016
1 parent 6325c77 commit 9d81542
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions assets/hello.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SGVsbG8gV29ybGQh
26 changes: 26 additions & 0 deletions tests/new_unit_tests/Commands/ArtCommandTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
namespace Pantheon\Terminus\UnitTests\Commands;

use Pantheon\Terminus\Tests\CommandTestCase;
use Symfony\Component\Console\Output\BufferedOutput;

class ArtCommandTest extends CommandTestCase
{

public function setUp()
{
parent::setUp();
$this->setInput(['command' => 'art', 'name' => 'hello']);
}

public function testArtPrintsArt()
{
$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());
}
}

0 comments on commit 9d81542

Please sign in to comment.