assertInvalidAggregates example


    foreach ($style_urls as $url) {
      $this->assertAggregate($url, TRUE, 'text/css');
      // Once the file has been requested once, it's on disk. It is possible for       // a second request to hit the controller, and then find that another       // request has created the file already. Actually simulating this race       // condition is not really possible since it relies on timing. However, by       // changing the case of the part of the URL that is handled by Drupal       // routing, we can force the request to be served by Drupal.       $this->assertAggregate(str_replace($this->fileAssetsPath, strtoupper($this->fileAssetsPath)$url), TRUE, 'text/css');
      $this->assertAggregate($url, FALSE, 'text/css');
      $this->assertInvalidAggregates($url);
    }

    foreach ($script_urls as $url) {
      $this->assertAggregate($url);
      $this->assertAggregate($url, FALSE);
      $this->assertInvalidAggregates($url);
    }
  }

  /** * Asserts the aggregate header. * * @param string $url * The source URL. * @param bool $from_php * (optional) Is the result from PHP or disk? Defaults to TRUE (PHP). * @param string|null $content_type * The expected content type, or NULL to skip checking. */
Home | Imprint | This part of the site doesn't use cookies.