mirror of
				https://github.com/hauke68/Magallanes.git
				synced 2025-10-31 15:20:17 +01:00 
			
		
		
		
	Merge pull request #162 from edpauto/phpunit-tests-completion
Fixes #159: PHPUnit tests tuning
This commit is contained in:
		
						commit
						7be2dd8589
					
				
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1,5 +1,7 @@ | ||||
| vendor | ||||
| mage.phar | ||||
| bin | ||||
| !bin/mage | ||||
| 
 | ||||
| # OS generated files # // GitHub Recommendation | ||||
| ###################### | ||||
|  | ||||
| @ -18,6 +18,9 @@ | ||||
|             "Command\\": ".mage/commands" | ||||
|         } | ||||
|     }, | ||||
|     "config": { | ||||
|         "bin-dir": "bin" | ||||
|     }, | ||||
|     "bin": [ | ||||
|         "bin/mage" | ||||
|     ] | ||||
|  | ||||
							
								
								
									
										3
									
								
								composer.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										3
									
								
								composer.lock
									
									
									
										generated
									
									
									
								
							| @ -4,7 +4,7 @@ | ||||
|         "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", | ||||
|         "This file is @generated automatically" | ||||
|     ], | ||||
|     "hash": "a19528b890d301384e45c1ed7d221e26", | ||||
|     "hash": "c66ae8cd7e44d614445b273f310d9c34", | ||||
|     "packages": [], | ||||
|     "packages-dev": [ | ||||
|         { | ||||
| @ -755,6 +755,7 @@ | ||||
|     "minimum-stability": "stable", | ||||
|     "stability-flags": [], | ||||
|     "prefer-stable": false, | ||||
|     "prefer-lowest": false, | ||||
|     "platform": { | ||||
|         "php": ">=5.3" | ||||
|     }, | ||||
|  | ||||
| @ -5,8 +5,8 @@ | ||||
|          backupGlobals="false" | ||||
|          verbose="true" | ||||
|          strict="true" | ||||
|          colors="false"> | ||||
|     <testsuite name="small"> | ||||
|          colors="true"> | ||||
|     <testsuite name="unit-tests"> | ||||
|       <directory suffix="Test.php">tests</directory> | ||||
|     </testsuite> | ||||
| 
 | ||||
|  | ||||
| @ -7,17 +7,21 @@ use PHPUnit_Framework_TestCase; | ||||
| 
 | ||||
| /** | ||||
|  * @group Mage_Console_Colors | ||||
|  * @coversDefaultClass Mage\Console\Colors | ||||
|  */ | ||||
| class ColorsTest extends PHPUnit_Framework_TestCase | ||||
| { | ||||
|     private $noColorParameter = "no-color"; | ||||
|     /** | ||||
|      * @group 159 | ||||
|      * @covers ::color | ||||
|      */ | ||||
|     public function testColor() | ||||
|     { | ||||
|         $config = $this->getMock('Mage\Config'); | ||||
|         $config->expects($this->once()) | ||||
|             ->method('getParameter') | ||||
|             ->with($this->noColorParameter) | ||||
|             ->will($this->returnValue(false)); | ||||
| 
 | ||||
|         $string = '<green>FooBar</green>'; | ||||
| @ -31,12 +35,14 @@ class ColorsTest extends PHPUnit_Framework_TestCase | ||||
| 
 | ||||
|     /** | ||||
|      * @group 159 | ||||
|      * @covers ::color | ||||
|      */ | ||||
|     public function testColorNoColor() | ||||
|     { | ||||
|         $config = $this->getMock('Mage\Config'); | ||||
|         $config->expects($this->once()) | ||||
|             ->method('getParameter') | ||||
|             ->with($this->noColorParameter) | ||||
|             ->will($this->returnValue(true)); | ||||
| 
 | ||||
|         $string = '<black>FooBar</black>'; | ||||
| @ -50,12 +56,14 @@ class ColorsTest extends PHPUnit_Framework_TestCase | ||||
| 
 | ||||
|     /** | ||||
|      * @group 159 | ||||
|      * @covers ::color | ||||
|      */ | ||||
|     public function testColorUnknownColorName() | ||||
|     { | ||||
|         $config = $this->getMock('Mage\Config'); | ||||
|         $config->expects($this->once()) | ||||
|             ->method('getParameter') | ||||
|             ->with($this->noColorParameter) | ||||
|             ->will($this->returnValue(false)); | ||||
| 
 | ||||
|         $string = '<foo>FooBar</foo>'; | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user