You are here

function CDNCssUrlTestCase::testCssUrl in CDN 7.2

File

tests/cdn.test, line 657
Test CDN.

Class

CDNCssUrlTestCase

Code

function testCssUrl() {
  global $base_url;
  $css_info = array(
    array(
      'type' => 'file',
      'data' => drupal_get_path('module', 'cdn') . '/tests/css/orig/url.css',
    ),
  );
  try {

    // Make sure the URL in the supplied CSS file matches what we expect.
    // trim() is needed to avoid issues with differences in newlines.
    $this
      ->assertEqual(trim(file_get_contents(_cdn_build_css_cache($css_info))), '.home{background:url(' . $base_url . '/' . drupal_get_path('module', 'cdn') . '/tests/css/orig/geo-md-webfont.eot?#iefix);}');
  } catch (Exception $exc) {
    $this
      ->fail($exc);
  }
}