function AkamaiTestCase::testSimpleClear in Akamai 8
Same name and namespace in other branches
- 8.2 akamai.test \AkamaiTestCase::testSimpleClear()
- 7.3 akamai.test \AkamaiTestCase::testSimpleClear()
- 7 akamai.test \AkamaiTestCase::testSimpleClear()
- 7.2 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 = $response['client']->paths;
$this
->assertEqual(1, count($paths), "Only one path cleared");
$this
->assertEqual($canonical, $paths[0], "Correct path was cleared");
}