You are here

function AkamaiTestCase::testSimpleClear in Akamai 7.2

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

Tests clear with no aliases.

File

./akamai.test, line 46
Akamai tests.

Class

AkamaiTestCase
Test basic API.

Code

function testSimpleClear() {
  $node = $this
    ->drupalCreateNode(array(
    'type' => 'page',
    'promote' => 1,
  ));
  $canonical = "node/{$node->nid}";
  $response = akamai_clear_url($canonical, array(), $node);
  $paths = !empty($response->client->paths) ? $response->client->paths : array();
  $this
    ->assertEqual(1, count($paths), "Only one path cleared");
  $this
    ->assertEqual($canonical, $paths[0], "Correct path was cleared");
}