/**
  * @test
  */
 public function testGetMarkup()
 {
     $this->markup->setBundlerDirectory('./.bundler');
     $this->markup->setHost('/');
     $this->markup->setDevelopment(false);
     $this->markup->setMinified(true);
     $this->markup->setVersionized(true);
     $expected = '<script src="/site/www/builds/javascriptFoo.min.js?v=' . $this->configCache['javascriptFoo']['md5'] . '"></script>';
     $this->assertEquals($expected, $this->markup->getMarkup('javascriptFoo'));
 }
Exemple #2
0
ini_set('display_errors', 'on');
// this makes our life easier when dealing with paths.
// everything is relative to the application root now.
chdir(dirname(__DIR__));
/** @noinspection PhpIncludeInspection */
require_once 'vendor/autoload.php';
$stylesheetMarkup = new StylesheetMarkup();
$stylesheetMarkup->setHost('/');
$stylesheetMarkup->setDevelopment(false);
$stylesheetMarkup->setMinified(true);
$stylesheetMarkup->setVersionized(true);
$javascriptMarkup = new JavascriptMarkup();
$javascriptMarkup->setHost('/');
$javascriptMarkup->setDevelopment(false);
$javascriptMarkup->setMinified(true);
$javascriptMarkup->setVersionized(true);
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>elnebuloso/bundler-markup</title>

    <!-- Bootstrap -->
    <?php 
echo $stylesheetMarkup->getMarkup('stylesheetFoo');
?>