-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Begin testing asset copy functionality
- Loading branch information
Showing
3 changed files
with
86 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
/** | ||
* Client side compilation is handled by third party libraries that must have | ||
* full test-suites associated. This test case is intended to test how PHP.Gt | ||
* interfaces with these libraries, rather than the functionality of the | ||
* libraries themselves. | ||
* | ||
* PHP.Gt (http://php.gt) | ||
* @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com) | ||
* @license Apache Version 2.0, January 2004. http://www.apache.org/licenses | ||
*/ | ||
namespace Gt\ClientSide; | ||
|
||
use \scssc as ScssParser; | ||
|
||
class Compiler_Test extends \PHPUnit_Framework_TestCase { | ||
|
||
private $tmp; | ||
|
||
public function setUp() { | ||
$this->tmp = \Gt\Test\Helper::createTmpDir(); | ||
} | ||
|
||
public function tearDown() { | ||
\Gt\Test\Helper::cleanup($this->tmp); | ||
} | ||
|
||
public function testCompilesScss() { | ||
$filePath = $this->tmp . "/file.scss"; | ||
$source = '$red: rgb(225, 16, 32); a { color: $red; }'; | ||
file_put_contents($filePath, $source); | ||
// Regular expressions used to ignore white space. | ||
$output = preg_replace("/\s/", "", Compiler::parse($filePath)); | ||
$expected = preg_replace("/\s/", "", "a { color: #e11020;}"); | ||
|
||
$this->assertEquals($expected, $output); | ||
} | ||
|
||
}# |
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