mirror of
https://github.com/hauke68/Magallanes.git
synced 2025-09-18 06:30:17 +02:00
Move colour config parameter to class property
This commit is contained in:
parent
93249ce5e5
commit
8694805eba
@ -11,6 +11,7 @@ use PHPUnit_Framework_TestCase;
|
|||||||
*/
|
*/
|
||||||
class ColorsTest extends PHPUnit_Framework_TestCase
|
class ColorsTest extends PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
protected $noColorParameter = "no-color";
|
||||||
/**
|
/**
|
||||||
* @group 159
|
* @group 159
|
||||||
* @covers ::color
|
* @covers ::color
|
||||||
@ -20,7 +21,7 @@ class ColorsTest extends PHPUnit_Framework_TestCase
|
|||||||
$config = $this->getMock('Mage\Config');
|
$config = $this->getMock('Mage\Config');
|
||||||
$config->expects($this->once())
|
$config->expects($this->once())
|
||||||
->method('getParameter')
|
->method('getParameter')
|
||||||
->with('no-color')
|
->with($this->noColorParameter)
|
||||||
->will($this->returnValue(false));
|
->will($this->returnValue(false));
|
||||||
|
|
||||||
$string = '<green>FooBar</green>';
|
$string = '<green>FooBar</green>';
|
||||||
@ -41,7 +42,7 @@ class ColorsTest extends PHPUnit_Framework_TestCase
|
|||||||
$config = $this->getMock('Mage\Config');
|
$config = $this->getMock('Mage\Config');
|
||||||
$config->expects($this->once())
|
$config->expects($this->once())
|
||||||
->method('getParameter')
|
->method('getParameter')
|
||||||
->with('no-color')
|
->with($this->noColorParameter)
|
||||||
->will($this->returnValue(true));
|
->will($this->returnValue(true));
|
||||||
|
|
||||||
$string = '<black>FooBar</black>';
|
$string = '<black>FooBar</black>';
|
||||||
@ -62,7 +63,7 @@ class ColorsTest extends PHPUnit_Framework_TestCase
|
|||||||
$config = $this->getMock('Mage\Config');
|
$config = $this->getMock('Mage\Config');
|
||||||
$config->expects($this->once())
|
$config->expects($this->once())
|
||||||
->method('getParameter')
|
->method('getParameter')
|
||||||
->with('no-color')
|
->with($this->noColorParameter)
|
||||||
->will($this->returnValue(false));
|
->will($this->returnValue(false));
|
||||||
|
|
||||||
$string = '<foo>FooBar</foo>';
|
$string = '<foo>FooBar</foo>';
|
||||||
|
Loading…
Reference in New Issue
Block a user