// Visit the system path for the node and confirm a cache entry is
// created.
\Drupal::
cache('data'
)->
deleteAll();
// Make sure the path is not converted to the alias.
$this->
drupalGet(trim($edit['path[0][value]'
], '/'
),
['alias' => TRUE
]);
$this->
assertNotEmpty(\Drupal::
cache('data'
)->
get('preload-paths:' .
$edit['path[0][value]'
]), 'Cache entry was created.'
);
// Visit the alias for the node and confirm a cache entry is created.
\Drupal::
cache('data'
)->
deleteAll();
// @todo Remove this once https://www.drupal.org/node/2480077 lands.
Cache::
invalidateTags(['rendered'
]);
$this->
drupalGet(trim($edit['alias[0][value]'
], '/'
));
$this->
assertNotEmpty(\Drupal::
cache('data'
)->
get('preload-paths:' .
$edit['path[0][value]'
]), 'Cache entry was created.'
);
} /**
* Tests alias functionality through the admin interfaces.
*/
public function testAdminAlias() { // Create test node.
$node1 =
$this->
drupalCreateNode();