예제 #1
0
 public function setUp()
 {
     vfsStream::setup('public');
     mkdir(vfsStream::url('public/js'));
     parent::setUp();
     AssetsLoader::appendSourceDir('tests/files/assets');
     AssetsLoader::setDestinationDir(vfsStream::url('public'));
 }
예제 #2
0
 public function testAssetLoading()
 {
     vfsStream::setup('public');
     AssetsLoader::appendSourceDir('tests/files/assets');
     AssetsLoader::setDestinationDir(vfsStream::url('public'));
     touch(vfsStream::url('public/existing.css'));
     $output = TemplateEngine::render('assets.tpl.php', array());
     $this->assertEquals("vfs://public/some.css\nvfs://public/another.css\nvfs://public/existing.css", $output);
     $this->assertFileExists(vfsStream::url('public/some.css'));
     $this->assertFileExists(vfsStream::url('public/another.css'));
 }
예제 #3
0
파일: Ntentan.php 프로젝트: ntentan/ntentan
 public static function run()
 {
     Session::start();
     honam\TemplateEngine::prependPath('views/shared');
     honam\TemplateEngine::prependPath('views/layouts');
     honam\AssetsLoader::setSiteUrl(Url::path('public'));
     honam\AssetsLoader::appendSourceDir('assets');
     honam\AssetsLoader::setDestinationDir('public');
     honam\Helper::setBaseUrl(Url::path(''));
     self::getRouter()->execute(substr(utils\Input::server('REQUEST_URI'), 1));
 }