forked from leafo/scssphp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathServerTest.php
More file actions
39 lines (33 loc) · 991 Bytes
/
ServerTest.php
File metadata and controls
39 lines (33 loc) · 991 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
/**
* SCSSPHP
*
* @copyright 2012-2015 Leaf Corcoran
*
* @license http://opensource.org/licenses/MIT MIT
*
* @link http://leafo.github.io/scssphp
*/
namespace Leafo\ScssPhp\Tests;
require_once __DIR__ . '/../example/Server.php';
use Leafo\ScssPhp\Server;
/**
* Server test
*
* @author Zimzat <zimzat@zimzat.com>
*/
class ServerTest extends \PHPUnit_Framework_TestCase
{
public function testCheckedCachedCompile()
{
if (! file_exists(__DIR__ . '/inputs/scss_cache')) {
mkdir(__DIR__ . '/inputs/scss_cache', 0755);
}
$server = new Server(__DIR__ . '/inputs/');
$css = $server->checkedCachedCompile(__DIR__ . '/inputs/import.scss', '/tmp/scss.css');
$this->assertFileExists('/tmp/scss.css');
$this->assertFileExists('/tmp/scss.css.meta');
$this->assertEquals($css, file_get_contents('/tmp/scss.css'));
$this->assertNotNull(unserialize(file_get_contents('/tmp/scss.css.meta')));
}
}