1.20.x path_pattern.test | PathPatternUnitTestCase::testPathDeleteMultiple() |
Test path_delete_multiple().
File
- modules/
path/ tests/ path_pattern.test, line 242 - Functionality tests for automatic path generation.
Class
- PathPatternUnitTestCase
- Unit tests for Path pattern functions.
Code
function testPathDeleteMultiple() {
$this->saveAlias('node/1', 'node-1-alias');
$this->saveAlias('node/1/view', 'node-1-alias/view');
$this->saveAlias('node/1', 'node-1-alias-en', 'en');
$this->saveAlias('node/1', 'node-1-alias-fr', 'fr');
$this->saveAlias('node/2', 'node-2-alias');
path_delete_all_by_source('node/1');
$this->assertNoAliasExists(array('source' => "node/1"));
$this->assertNoAliasExists(array('source' => "node/1/view"));
$this->assertAliasExists(array('source' => "node/2"));
}