1
0
mirror of https://github.com/Intervention/image.git synced 2025-01-17 20:28:21 +01:00
intervention_image/tests/AbstractCommandTest.php
Oliver Vogel 9bb6b213c2 v2
2014-05-10 20:35:01 +02:00

47 lines
1.2 KiB
PHP

<?php
class AbstractCommandTest extends PHPUnit_Framework_TestCase
{
public function tearDown()
{
Mockery::close();
}
public function testGetArgument()
{
$command = $this->getTestCommand();
$this->assertEquals('foo', $command->getArgument(0));
$this->assertEquals('bar', $command->getArgument(1));
}
public function testGetOutput()
{
$command = $this->getTestCommand();
$command->setOutput('foo');
$this->assertEquals('foo', $command->getOutput());
}
public function testHasOutput()
{
$command = $this->getTestCommand();
$this->assertEquals(false, $command->hasOutput());
$command->setOutput('foo');
$this->assertEquals(true, $command->hasOutput());
}
public function testSetOutput()
{
$command = $this->getTestCommand();
$command->setOutput('foo');
$this->assertEquals(true, $command->hasOutput());
}
public function getTestCommand()
{
$arguments = array('foo', 'bar');
$command = $this->getMockForAbstractClass('\Intervention\Image\Commands\AbstractCommand', array($arguments));
return $command;
}
}