Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #393 from andres-montanez/nostromo
Release for Version 3.3.0
- Loading branch information
Showing
9 changed files
with
119 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,6 @@ | |
*/ | ||
class Mage | ||
{ | ||
const VERSION = '3.2'; | ||
const VERSION = '3.3.0'; | ||
const CODENAME = 'Nostromo'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<?php | ||
|
||
namespace Mage\tests\Task\BuiltIn\Symfony; | ||
|
||
|
||
use Mage\Task\BuiltIn\Symfony\AsseticDumpTask; | ||
use Mage\Tests\Runtime\RuntimeMockup; | ||
|
||
class AsseticDumpTaskTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* @var RuntimeMockup | ||
*/ | ||
private $runtime; | ||
|
||
public function setUp() | ||
{ | ||
$this->runtime = new RuntimeMockup(); | ||
$this->runtime->setConfiguration(['environments' => ['test' => []]]); | ||
$this->runtime->setEnvironment('test'); | ||
} | ||
|
||
public function testAsseticDumpTask() | ||
{ | ||
$task = new AsseticDumpTask(); | ||
$task->setOptions(['env' => 'test']); | ||
$task->setRuntime($this->runtime); | ||
$this->assertEquals('[Symfony] Assetic Dump', $task->getDescription()); | ||
$task->execute(); | ||
|
||
$testCase = [ | ||
'bin/console assetic:dump --env=test' => 120, | ||
]; | ||
|
||
$this->assertRanCommands($testCase); | ||
} | ||
|
||
public function testAsseticDumpTaskWithTimeoutOption() | ||
{ | ||
$task = new AsseticDumpTask(); | ||
$task->setOptions(['env' => 'test', 'timeout' => 300]); | ||
$task->setRuntime($this->runtime); | ||
$task->execute(); | ||
|
||
|
||
$testCase = [ | ||
'bin/console assetic:dump --env=test' => 300, | ||
]; | ||
|
||
$this->assertRanCommands($testCase); | ||
} | ||
|
||
/** | ||
* @param $testCase | ||
*/ | ||
private function assertRanCommands($testCase) | ||
{ | ||
$ranCommands = $this->runtime->getRanCommands(); | ||
|
||
// Check total of Executed Commands | ||
$this->assertEquals(count($testCase), count($ranCommands)); | ||
|
||
// Check Generated Commands | ||
$index = 0; | ||
foreach ($testCase as $command => $timeout) { | ||
$this->assertEquals($command, $ranCommands[$index++]); | ||
$this->assertEquals($timeout, $this->runtime->getRanCommandTimeoutFor($command)); | ||
} | ||
} | ||
} |