Ejemplo n.º 1
0
 /**
  * @param UIAsset $uiAsset
  */
 private function serveJsFile($uiAsset)
 {
     ProxyHttp::serverStaticFile($uiAsset->getAbsoluteLocation(), self::JS_MIME_TYPE);
 }
Ejemplo n.º 2
0
 /**
  * @param int $previousDate
  */
 private function validateDateIsMoreRecent($previousDate)
 {
     $this->clearDateCache();
     $this->assertTrue($previousDate < $this->mergedAsset->getModificationDate());
 }
 /**
  * @param UIAsset $uiAsset
  * @return int
  */
 protected function countDirectoriesInPathToRoot($uiAsset)
 {
     $rootDirectory = realpath($uiAsset->getBaseDirectory());
     if ($rootDirectory != '/' && substr_compare($rootDirectory, '/', -1)) {
         $rootDirectory .= '/';
     }
     $rootDirectoryLen = strlen($rootDirectory);
     return $rootDirectoryLen;
 }
Ejemplo n.º 4
0
 /**
  * @param UIAsset $uiAsset
  * @return int
  */
 protected function countDirectoriesInPathToRoot($uiAsset)
 {
     $rootDirectory = realpath($uiAsset->getBaseDirectory());
     if ($rootDirectory != PATH_SEPARATOR && substr($rootDirectory, -strlen(PATH_SEPARATOR)) !== PATH_SEPARATOR) {
         $rootDirectory .= PATH_SEPARATOR;
     }
     $rootDirectoryLen = strlen($rootDirectory);
     return $rootDirectoryLen;
 }
Ejemplo n.º 5
0
 private function writeContentToFile()
 {
     $this->mergedAsset->writeContent($this->mergedContent);
 }
Ejemplo n.º 6
0
 /**
  * @param string $expectedContent
  */
 private function validateExpectedContent($expectedContent)
 {
     $this->assertEquals($expectedContent, $this->mergedAsset->getContent());
 }