getPublishedUrl() public method

This method does not perform any publishing. It merely tells you if the file path is published, what the URL will be to access it.
public getPublishedUrl ( $path ) : string
return string the published URL for the file path
Ejemplo n.º 1
0
 public function testPublishFilePathWithDirectory()
 {
     $manager = new TAssetManager();
     $manager->setBaseUrl('/');
     $manager->init(null);
     // Try to publish a directory
     $dirToPublish = dirname(__FILE__) . '/data';
     $publishedUrl = $manager->publishFilePath($dirToPublish);
     $publishedDir = self::$assetDir . $publishedUrl;
     self::assertEquals($publishedDir, $manager->getPublishedPath($dirToPublish));
     self::assertEquals($publishedUrl, $manager->getPublishedUrl($dirToPublish));
     self::assertTrue(is_dir($publishedDir));
     self::assertTrue(is_file($publishedDir . '/pradoheader.gif'));
 }