Exemplo n.º 1
0
 /**
  * @test
  */
 public function isScriptaculousNotLoadedCompressedIfCompressionIsNotConfigured()
 {
     $subject = new \TYPO3\CMS\Core\Page\PageRenderer();
     $_SERVER['HTTP_ACCEPT_ENCODING'] = 'gzip,deflate';
     $GLOBALS['TYPO3_CONF_VARS']['BE']['compressionLevel'] = '';
     $subject->loadScriptaculous('slider,controls');
     $subject->enableCompressJavascript();
     $out = $subject->render();
     $this->assertRegExp('#<script src="[^"]*/typo3temp/compressor/scriptaculous-[a-f0-9]+.js" type="text/javascript"></script>#', $out);
     $this->assertRegExp('#<script src="[^"]*/typo3temp/compressor/effects-[a-f0-9]+.js" type="text/javascript"></script>#', $out);
     $this->assertRegExp('#<script src="[^"]*/typo3temp/compressor/controls-[a-f0-9]+.js" type="text/javascript"></script>#', $out);
     $this->assertRegExp('#<script src="[^"]*/typo3temp/compressor/slider-[a-f0-9]+.js" type="text/javascript"></script>#', $out);
 }