Skip to content
Snippets Groups Projects
Commit 69f27a05 authored by totten's avatar totten
Browse files

The default URLs should be relative to web root (not "FIXME").

parent b91a20c0
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,8 @@ class BasicAssetRule extends AbstractAssetRule {
. sprintf("\$civicrm_paths[%s][%s] = %s;\n",
var_export($this->pathVar, 1),
var_export('url', 1),
var_export('FIXME' . $this->getWebPath($publisher), 1));
// Common default: Relative to web root
var_export($this->getWebPath($publisher), 1));
}
}
......@@ -18,7 +18,7 @@ class CustomPathsTest extends \Civi\AssetPlugin\Integration\IntegrationTestCase
'extra' => [
'civicrm-asset' => [
'path' => 'htdocs/foo-civi-assets',
'url' => '/bar-civi-assets',
'url' => 'http://example.com/bar-civi-assets',
// FIXME: Maybe custom 'files' listing as well?
],
],
......@@ -67,9 +67,9 @@ class CustomPathsTest extends \Civi\AssetPlugin\Integration\IntegrationTestCase
// The JS/CSS assets are sync'd to web dir, but the $civicrm_paths should still autoload PHP from the src folder.
$expectPaths = [];
$expectPaths['civicrm.root']['path'] = realpath(self::getTestDir()) . '/vendor/civicrm/civicrm-core';
$expectPaths['civicrm.root']['url'] = 'FIXME/bar-civi-assets/core';
$expectPaths['civicrm.root']['url'] = 'http://example.com/bar-civi-assets/core';
$expectPaths['civicrm.packages']['path'] = realpath(self::getTestDir()) . '/vendor/civicrm/civicrm-packages';
$expectPaths['civicrm.packages']['url'] = 'FIXME/bar-civi-assets/packages';
$expectPaths['civicrm.packages']['url'] = 'http://example.com/bar-civi-assets/packages';
// FIXME url checks
$count = 0;
......
......@@ -57,9 +57,9 @@ class DefaultPathsTest extends \Civi\AssetPlugin\Integration\IntegrationTestCase
// The JS/CSS assets are sync'd to web dir, but the $civicrm_paths should still autoload PHP from the src folder.
$expectPaths = [];
$expectPaths['civicrm.root']['path'] = realpath(self::getTestDir()) . '/vendor/civicrm/civicrm-core';
$expectPaths['civicrm.root']['url'] = 'FIXME/civicrm-assets/core';
$expectPaths['civicrm.root']['url'] = '/civicrm-assets/core';
$expectPaths['civicrm.packages']['path'] = realpath(self::getTestDir()) . '/vendor/civicrm/civicrm-packages';
$expectPaths['civicrm.packages']['url'] = 'FIXME/civicrm-assets/packages';
$expectPaths['civicrm.packages']['url'] = '/civicrm-assets/packages';
// FIXME url checks
$count = 0;
......
......@@ -76,9 +76,9 @@ class DrupalProjectPathsTest extends \Civi\AssetPlugin\Integration\IntegrationTe
// The JS/CSS assets are sync'd to web dir, but the $civicrm_paths should still autoload PHP from the src folder.
$expectPaths = [];
$expectPaths['civicrm.root']['path'] = realpath(self::getTestDir()) . '/vendor/civicrm/civicrm-core';
$expectPaths['civicrm.root']['url'] = 'FIXME/libraries/civicrm/core';
$expectPaths['civicrm.root']['url'] = '/libraries/civicrm/core';
$expectPaths['civicrm.packages']['path'] = realpath(self::getTestDir()) . '/vendor/civicrm/civicrm-packages';
$expectPaths['civicrm.packages']['url'] = 'FIXME/libraries/civicrm/packages';
$expectPaths['civicrm.packages']['url'] = '/libraries/civicrm/packages';
// FIXME url checks
$count = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment