/** * @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')); }
<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'); ?> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <h1>bundler-markup <small>elnebuloso</small> </h1> </div> <?php echo $javascriptMarkup->getMarkup('javascriptFoo'); ?> </body> </html>