You are here

function AkamaiTestCase::testDirectClear in Akamai 7.2

Same name and namespace in other branches
  1. 8 akamai.test \AkamaiTestCase::testDirectClear()
  2. 8.2 akamai.test \AkamaiTestCase::testDirectClear()
  3. 7.3 akamai.test \AkamaiTestCase::testDirectClear()
  4. 7 akamai.test \AkamaiTestCase::testDirectClear()

Tests clear.

File

./akamai.test, line 31
Akamai tests.

Class

AkamaiTestCase
Test basic API.

Code

function testDirectClear() {
  $node = $this
    ->drupalCreateNode(array(
    'type' => 'page',
    'promote' => 1,
  ));
  $canonical = "node/{$node->nid}";
  $akamai = akamai_get_class();
  $akamai
    ->clear_url($canonical);
  $paths = $akamai->paths;
  $this
    ->assertEqual(1, count($paths), "Only one path cleared");
  $this
    ->assertEqual($canonical, $paths[0]);
}