mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Added tests for File::getURL() and File::getAbsoluteURL() (from r109066)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112772 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
f99e6059b1
commit
db8035e1a1
@ -149,6 +149,16 @@ class FileTest extends SapphireTest {
|
||||
$this->assertEquals(ASSETS_PATH . '/FileTest.txt', $rootfile->getFullPath(), 'File in assets/ folder');
|
||||
}
|
||||
|
||||
function testGetURL() {
|
||||
$rootfile = $this->objFromFixture('File', 'asdf');
|
||||
$this->assertEquals(Director::baseURL() . $rootfile->getFilename(), $rootfile->getURL());
|
||||
}
|
||||
|
||||
function testGetAbsoluteURL() {
|
||||
$rootfile = $this->objFromFixture('File', 'asdf');
|
||||
$this->assertEquals(Director::absoluteBaseURL() . $rootfile->getFilename(), $rootfile->getAbsoluteURL());
|
||||
}
|
||||
|
||||
function testNameAndTitleGeneration() {
|
||||
/* If objects are loaded into the system with just a Filename, then Name is generated but Title isn't */
|
||||
$file = $this->objFromFixture('File', 'asdf');
|
||||
|
Loading…
Reference in New Issue
Block a user