diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-10-13 12:43:30 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-10-13 12:43:30 +0000 |
commit | 32ba32df76fca6aa00c3a613b009cab9f4146a1b (patch) | |
tree | cd73fb94eea44adda0b1dac55cc77d4afe45ff4a /modules | |
parent | 12393a4d128b4a890df76fd7aba6dd9e27db80f1 (diff) | |
download | brdo-32ba32df76fca6aa00c3a613b009cab9f4146a1b.tar.gz brdo-32ba32df76fca6aa00c3a613b009cab9f4146a1b.tar.bz2 |
- Patch #296442 by Damien Tournoud: made upload and blog API tests pass without clean URLs enabled.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/blogapi/blogapi.test | 3 | ||||
-rw-r--r-- | modules/upload/upload.test | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/modules/blogapi/blogapi.test b/modules/blogapi/blogapi.test index b1ac8b1b0..eb77f5061 100644 --- a/modules/blogapi/blogapi.test +++ b/modules/blogapi/blogapi.test @@ -24,6 +24,7 @@ class BlogAPITestCase extends DrupalWebTestCase { * Create, edit, and delete post; upload file; set/get categories. */ function testBlogAPI() { + global $base_url; // Create admin user and taxononmy for later use. $admin_user = $this->drupalCreateUser(array('administer taxonomy')); $this->drupalLogin($admin_user); @@ -36,7 +37,7 @@ class BlogAPITestCase extends DrupalWebTestCase { $this->drupalLogin($web_user); // Init common variables. - $local = url('xmlrpc.php', array('absolute' => TRUE)); + $local = url($base_url . '/xmlrpc.php', array('external' => TRUE)); $appid = 'simpletest'; // Get user's blog. diff --git a/modules/upload/upload.test b/modules/upload/upload.test index a1f05757e..c143e486d 100644 --- a/modules/upload/upload.test +++ b/modules/upload/upload.test @@ -21,6 +21,7 @@ class UploadTestCase extends DrupalWebTestCase { * Create node; upload files to node; and edit, and delete uploads. */ function testNodeUpload() { + global $base_url; $admin_user = $this->drupalCreateUser(array('administer site configuration')); $web_user = $this->drupalCreateUser(array('access content', 'edit any page content', 'upload files', 'view uploaded files')); @@ -72,7 +73,7 @@ class UploadTestCase extends DrupalWebTestCase { $this->assertRaw(t('Page %title has been updated.', array('%title' => $node->title)), 'File deleted successfully.'); $this->assertNoText($new_name, $new_name . ' not found on node.'); - $this->drupalGet(file_directory_path() . '/' . $upload->description); + $this->drupalGet($base_url . '/' . file_directory_path() . '/' . $upload->description, array('external' => TRUE)); $this->assertResponse(array(404), 'Uploaded ' . $upload->description . ' is not accessible.'); } else { @@ -191,8 +192,9 @@ class UploadTestCase extends DrupalWebTestCase { * @param string $filename Name of file to verifiy. */ function checkUploadedFile($filename) { + global $base_url; $file = realpath(file_directory_path() . '/' . $filename); - $this->drupalGet(file_directory_path() . '/' . $filename); + $this->drupalGet($base_url . '/' . file_directory_path() . '/' . $filename, array('external' => TRUE)); $this->assertResponse(array(200), 'Uploaded ' . $filename . ' is accessible.'); $this->assertEqual(file_get_contents($file), $this->drupalGetContent(), 'Uploaded contents of ' . $filename . ' verified.'); } |