diff options
Diffstat (limited to 'modules/path/path.test')
-rw-r--r-- | modules/path/path.test | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/modules/path/path.test b/modules/path/path.test index acd4e20a6..f5c303c3a 100644 --- a/modules/path/path.test +++ b/modules/path/path.test @@ -2,9 +2,12 @@ /** * @file - * Tests for path.module. + * Tests for the Path module. */ +/** + * Provides a base class for testing the Path module. + */ class PathTestCase extends DrupalWebTestCase { public static function getInfo() { return array( @@ -23,7 +26,7 @@ class PathTestCase extends DrupalWebTestCase { } /** - * Test the path cache. + * Tests the path cache. */ function testPathCache() { // Create test node. @@ -48,7 +51,7 @@ class PathTestCase extends DrupalWebTestCase { } /** - * Test alias functionality through the admin interfaces. + * Tests alias functionality through the admin interfaces. */ function testAdminAlias() { // Create test node. @@ -107,7 +110,7 @@ class PathTestCase extends DrupalWebTestCase { } /** - * Test alias functionality through the node interfaces. + * Tests alias functionality through the node interfaces. */ function testNodeAlias() { // Create test node. @@ -159,6 +162,15 @@ class PathTestCase extends DrupalWebTestCase { $this->assertResponse(404); } + /** + * Returns the path ID. + * + * @param $alias + * A string containing an aliased path. + * + * @return int + * Integer representing the path ID. + */ function getPID($alias) { return db_query("SELECT pid FROM {url_alias} WHERE alias = :alias", array(':alias' => $alias))->fetchField(); } @@ -182,7 +194,7 @@ class PathTestCase extends DrupalWebTestCase { } /** - * Test URL aliases for taxonomy terms. + * Tests URL aliases for taxonomy terms. */ class PathTaxonomyTermTestCase extends DrupalWebTestCase { public static function getInfo() { @@ -202,7 +214,7 @@ class PathTaxonomyTermTestCase extends DrupalWebTestCase { } /** - * Test alias functionality through the admin interfaces. + * Tests alias functionality through the admin interfaces. */ function testTermAlias() { // Create a term in the default 'Tags' vocabulary with URL alias. @@ -245,6 +257,9 @@ class PathTaxonomyTermTestCase extends DrupalWebTestCase { } } +/** + * Tests URL aliases for translated nodes. + */ class PathLanguageTestCase extends DrupalWebTestCase { public static function getInfo() { return array( |