drupalGetJSON($url); $this->assertTrue(isset($response['[node:nid]'])); $this->assertTrue(isset($response['[node:author]'])); $this->assertTrue(isset($response['[node:url]'])); $this->assertTrue(isset($response['[node:url:'])); $url = $url_prefix . 'Title of [node:url:'; $response = $this->drupalGetJSON($url); $this->assertTrue(isset($response['[node:url:path]'])); $this->assertTrue(isset($response['[node:url:absolute]'])); } /** * Tests autocomplete for user tokens. */ public function testUserAutocomplete() { $url_prefix = "token/autocomplete/user/"; $url = $url_prefix . 'Name of the [us'; $response = $this->drupalGetJSON($url); $this->assertTrue(isset($response['[user:uid]'])); $this->assertTrue(isset($response['[user:original]'])); $this->assertTrue(isset($response['[user:url]'])); $this->assertTrue(isset($response['[user:url:'])); $url = $url_prefix . 'Title of [user:original:'; $response = $this->drupalGetJSON($url); $this->assertTrue(isset($response['[user:original:uid]'])); } }