You are here

function FileURLRewritingTest::testPublicCreatedFileURL in SimpleTest 7

Test the generating of rewritten public created file URLs.

File

tests/file.test, line 1967
This provides SimpleTests for the core file handling functionality. These include FileValidateTest and FileSaveTest.

Class

FileURLRewritingTest
Tests for file URL rewriting.

Code

function testPublicCreatedFileURL() {

  // Test generating an URL to a created file.
  $file = $this
    ->createFile();
  $url = file_create_url($file->uri);
  $this
    ->assertEqual(FILE_URL_TEST_CDN_2 . '/' . file_directory_path() . '/' . $file->filename, $url, t('Correctly generated a URL for a created file.'));
}