mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-07 02:01:24 +02:00
* NEW Make resources dir configurable. * Removing reference to old `resources` and updating doc #8519 * Rrtarget to 4.4 release. * DOC Reference SS_RESOURCES_DIR in Environment doc. * API Add a Resources method to SilverStripe\Core\Manifest\Module to read the resources-dir from composer.json * Clean up reference to SS_RESOURCES_DIR env var * Set default resources-dir * Update test to use RESOURCES_DIR const in expected resource url method * Correcting typos Co-Authored-By: maxime-rainville <maxime@rainville.me> * MINOR Correctubg minor typos * DOCS Document the intricacies of exposing static assets.
25 lines
697 B
PHP
25 lines
697 B
PHP
<?php
|
|
|
|
namespace SilverStripe\Core\Tests\Manifest;
|
|
|
|
use SilverStripe\Control\Director;
|
|
use SilverStripe\Core\Manifest\Module;
|
|
use SilverStripe\Dev\SapphireTest;
|
|
|
|
class ModuleTest extends SapphireTest
|
|
{
|
|
public function testUnsetResourcesDir()
|
|
{
|
|
$path = __DIR__ . '/fixtures/ss-projects/withoutCustomResourcesDir';
|
|
$module = new Module($path, $path);
|
|
$this->assertEquals('', $module->getResourcesDir());
|
|
}
|
|
|
|
public function testResourcesDir()
|
|
{
|
|
$path = __DIR__ . '/fixtures/ss-projects/withCustomResourcesDir';
|
|
$module = new Module($path, $path);
|
|
$this->assertEquals('customised-resources-dir', $module->getResourcesDir());
|
|
}
|
|
}
|