mirror of
https://github.com/hauke68/Magallanes.git
synced 2025-09-17 06:10:17 +02:00
phpunit annotations added
This commit is contained in:
parent
1e912a367a
commit
8bd7f6c56c
@ -20,6 +20,9 @@ class FactoryTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->config = $this->getMock('Mage\Config');
|
$this->config = $this->getMock('Mage\Config');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @covers Factory::get
|
||||||
|
*/
|
||||||
public function testGet()
|
public function testGet()
|
||||||
{
|
{
|
||||||
$command = Factory::get('add', $this->config);
|
$command = Factory::get('add', $this->config);
|
||||||
@ -28,12 +31,16 @@ class FactoryTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException \Exception
|
* @expectedException \Exception
|
||||||
|
* @covers Factory::get
|
||||||
*/
|
*/
|
||||||
public function testGetClassNotFoundException()
|
public function testGetClassNotFoundException()
|
||||||
{
|
{
|
||||||
$command = Factory::get('commanddoesntexist', $this->config);
|
$command = Factory::get('commanddoesntexist', $this->config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @covers Factory::get
|
||||||
|
*/
|
||||||
public function testGetCustomCommand()
|
public function testGetCustomCommand()
|
||||||
{
|
{
|
||||||
$this->getMockBuilder('Mage\\Command\\AbstractCommand')
|
$this->getMockBuilder('Mage\\Command\\AbstractCommand')
|
||||||
@ -42,7 +49,7 @@ class FactoryTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* current workaround
|
* current workaround
|
||||||
* @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/134
|
* @link https://github.com/sebastianbergmann/phpunit-mock-objects/issues/134
|
||||||
*/
|
*/
|
||||||
class_alias('MyCommand', 'Command\\MyCommand');
|
class_alias('MyCommand', 'Command\\MyCommand');
|
||||||
|
|
||||||
@ -53,6 +60,7 @@ class FactoryTest extends PHPUnit_Framework_TestCase
|
|||||||
/**
|
/**
|
||||||
* @expectedException \Exception
|
* @expectedException \Exception
|
||||||
* @expectedExceptionMessage The command MyInconsistentCommand must be an instance of Mage\Command\AbstractCommand.
|
* @expectedExceptionMessage The command MyInconsistentCommand must be an instance of Mage\Command\AbstractCommand.
|
||||||
|
* @covers Factory::get
|
||||||
*/
|
*/
|
||||||
public function testGetInconsistencyException()
|
public function testGetInconsistencyException()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user