? simpletest ? simpletest.install ? tests/.svn Index: drupal_test_case.php =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/drupal_test_case.php,v retrieving revision 1.78 diff -u -p -r1.78 drupal_test_case.php --- drupal_test_case.php 30 Mar 2008 21:43:29 -0000 1.78 +++ drupal_test_case.php 1 Apr 2008 07:54:45 -0000 @@ -839,7 +761,7 @@ class DrupalTestCase extends UnitTestCas * @param string $message Message to display. * @return boolean TRUE on pass. */ - function assertWantedRaw($raw, $message = "%s") { + function assertRaw($raw, $message = "%s") { return $this->assertFalse(strpos($this->_content, $raw) === FALSE, $message); } @@ -851,7 +773,7 @@ class DrupalTestCase extends UnitTestCas * @param string $message Message to display. * @return boolean TRUE on pass. */ - function assertNoUnwantedRaw($raw, $message = "%s") { + function assertNoRaw($raw, $message = "%s") { return $this->assertTrue(strpos($this->_content, $raw) === FALSE, $message); } @@ -870,19 +792,6 @@ class DrupalTestCase extends UnitTestCas } /** - * Pass if the text IS found on the text version of the page. The text version - * is the equivilent of what a user would see when viewing through a web browser. - * In other words the HTML has been filtered out of the contents. - * - * @param string $raw Text string to look for. - * @param string $message Message to display. - * @return boolean TRUE on pass. - */ - function assertWantedText($text, $message) { - return $this->assertTextHelper($text, $message, FALSE); - } - - /** * Pass if the text is NOT found on the text version of the page. The text version * is the equivilent of what a user would see when viewing through a web browser. * In other words the HTML has been filtered out of the contents. @@ -896,19 +805,6 @@ class DrupalTestCase extends UnitTestCas } /** - * Pass if the text is NOT found on the text version of the page. The text version - * is the equivilent of what a user would see when viewing through a web browser. - * In other words the HTML has been filtered out of the contents. - * - * @param string $raw Text string to look for. - * @param string $message Message to display. - * @return boolean TRUE on pass. - */ - function assertNoUnwantedText($text, $message) { - return $this->assertTextHelper($text, $message, TRUE); - } - - /** * Filter out the HTML of the page and assert that the plain text us found. Called by * the plain text assertions. * Index: tests/functional/aggregator.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/aggregator.test,v retrieving revision 1.7 diff -u -p -r1.7 aggregator.test --- tests/functional/aggregator.test 27 Mar 2008 02:48:52 -0000 1.7 +++ tests/functional/aggregator.test 1 Apr 2008 07:54:46 -0000 @@ -22,7 +22,7 @@ class AggregatorTestCase extends DrupalT function createFeed() { $edit = $this->getFeedEditArray(); $this->drupalPost('admin/content/aggregator/add/feed', $edit, t('Save')); - $this->assertWantedRaw(t('The feed %name has been added.', array('%name' => $edit['title'])), t('The feed !name has been added.', array('!name' => $edit['title']))); + $this->assertRaw(t('The feed %name has been added.', array('%name' => $edit['title'])), t('The feed !name has been added.', array('!name' => $edit['title']))); $feed = db_fetch_object(db_query("SELECT * FROM {aggregator_feed} WHERE title = '%s' AND url='%s'", $edit['title'], $edit['url'])); $this->assertTrue(!empty($feed), t('The feed found in database.')); @@ -36,7 +36,7 @@ class AggregatorTestCase extends DrupalT */ function deleteFeed($feed) { $this->drupalPost('admin/content/aggregator/edit/feed/'. $feed->fid, array(), t('Delete')); - $this->assertWantedRaw(t('The feed %title has been deleted.', array('%title' => $feed->title)), t('Feed deleted successfully.')); + $this->assertRaw(t('The feed %title has been deleted.', array('%title' => $feed->title)), t('Feed deleted successfully.')); } /** @@ -90,7 +90,7 @@ class AggregatorTestCase extends DrupalT */ function removeFeedItems($feed) { $this->drupalPost('admin/content/aggregator/remove/' . $feed->fid, array(), t('Remove items')); - $this->assertWantedRaw(t('The news items from %title have been removed.', array('%title' => $feed->title)), t('Feed items removed.')); + $this->assertRaw(t('The news items from %title have been removed.', array('%title' => $feed->title)), t('Feed items removed.')); } /** @@ -173,7 +173,7 @@ class UpdateFeedTestCase extends Aggrega $edit = $this->getFeedEditArray(); $edit['refresh'] = 1800; // Change refresh value. $this->drupalPost('admin/content/aggregator/edit/feed/'. $feed->fid, $edit, t('Save')); - $this->assertWantedRaw(t('The feed %name has been updated.', array('%name' => $edit['title'])), t('The feed %name has been updated.', array('%name' => $edit['title']))); + $this->assertRaw(t('The feed %name has been updated.', array('%name' => $edit['title'])), t('The feed %name has been updated.', array('%name' => $edit['title']))); // Check feed data. $this->assertEqual($this->getUrl(), url('admin/content/aggregator/', array('absolute' => TRUE))); Index: tests/functional/block.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/block.test,v retrieving revision 1.8 diff -u -p -r1.8 block.test --- tests/functional/block.test 30 Mar 2008 04:56:16 -0000 1.8 +++ tests/functional/block.test 1 Apr 2008 07:54:46 -0000 @@ -56,7 +56,7 @@ class BlockTestCase extends DrupalTestCa // Delete the created box & verify that it's been deleted and no longer appearing on the page. $this->drupalPost('admin/build/block/delete/'. $bid, array(), t('Delete')); - $this->assertWantedRaw(t('The block %title has been removed.', array('%title' => $box['info'])), t('Box successfully deleted.')); + $this->assertRaw(t('The block %title has been removed.', array('%title' => $box['info'])), t('Box successfully deleted.')); $this->assertNoText(t($box['title']), t('Box no longer appears on page.')); } Index: tests/functional/blog.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/blog.test,v retrieving revision 1.1 diff -u -p -r1.1 blog.test --- tests/functional/blog.test 31 Mar 2008 01:48:01 -0000 1.1 +++ tests/functional/blog.test 1 Apr 2008 07:54:46 -0000 @@ -124,12 +124,12 @@ class BlogModuleTestCase extends DrupalT $edit['title'] = 'node/' . $node->nid; $edit['body'] = $this->randomName(256); $this->drupalPost('node/'. $node->nid .'/edit', $edit, t('Save')); - $this->assertWantedRaw(t('Blog entry %title has been updated.', array('%title' => $edit['title'])), t('Blog node was edited')); + $this->assertRaw(t('Blog entry %title has been updated.', array('%title' => $edit['title'])), t('Blog node was edited')); // Delete blog node. $this->drupalPost('node/'. $node->nid .'/delete', array(), t('Delete')); $this->assertResponse($response); - $this->assertWantedRaw(t('Blog entry %title has been deleted.', array('%title' => $edit['title'])), t('Blog node was deleted')); + $this->assertRaw(t('Blog entry %title has been deleted.', array('%title' => $edit['title'])), t('Blog node was deleted')); } } Index: tests/functional/blogapi.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/blogapi.test,v retrieving revision 1.8 diff -u -p -r1.8 blogapi.test --- tests/functional/blogapi.test 24 Mar 2008 02:36:46 -0000 1.8 +++ tests/functional/blogapi.test 1 Apr 2008 07:54:46 -0000 @@ -110,7 +110,7 @@ class BlogAPITestCase extends DrupalTest $this->drupalPost('admin/content/taxonomy/edit/vocabulary/'. $vid, array(), t('Delete')); $this->drupalPost(NULL, array(), t('Delete')); - $this->assertWantedRaw(t('Deleted vocabulary %vocab.', array('%vocab' => 'simpletest_vocab')), 'Removed vocabulary.'); + $this->assertRaw(t('Deleted vocabulary %vocab.', array('%vocab' => 'simpletest_vocab')), 'Removed vocabulary.'); } /** @@ -123,7 +123,7 @@ class BlogAPITestCase extends DrupalTest $edit['name'] = $vocab; $edit['nodes[blog]'] = TRUE; $this->drupalPost('admin/content/taxonomy/add/vocabulary', $edit, t('Save')); - $this->assertWantedRaw(t('Created new vocabulary %vocab.', array('%vocab' => $edit['name'])), 'Taxonomy vocabulary added.'); + $this->assertRaw(t('Created new vocabulary %vocab.', array('%vocab' => $edit['name'])), 'Taxonomy vocabulary added.'); $vocab_arr = taxonomy_get_vocabularies(); $vid = NULL; @@ -148,7 +148,7 @@ class BlogAPITestCase extends DrupalTest $edit = array(); $edit['name'] = $term; $this->drupalPost('admin/content/taxonomy/'. $vid .'/add/term', $edit, t('Save')); - $this->assertWantedRaw(t('Created new term %term.', array('%term' => $edit['name'])), 'Taxonomy term added.'); + $this->assertRaw(t('Created new term %term.', array('%term' => $edit['name'])), 'Taxonomy term added.'); $tree = taxonomy_get_tree($vid); $tid = NULL; Index: tests/functional/book.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/book.test,v retrieving revision 1.9 diff -u -p -r1.9 book.test --- tests/functional/book.test 30 Mar 2008 21:21:45 -0000 1.9 +++ tests/functional/book.test 1 Apr 2008 07:54:46 -0000 @@ -90,20 +90,20 @@ class BookTestCase extends DrupalTestCas // Check previous, up, and next links. if ($previous) { - $this->assertWantedRaw(l('‹ ' . $previous->title, 'node/' . $previous->nid, array('attributes' => array('class' => 'page-previous', 'title' => t('Go to previous page')))), t('Prevoius page link found.')); + $this->assertRaw(l('‹ ' . $previous->title, 'node/' . $previous->nid, array('attributes' => array('class' => 'page-previous', 'title' => t('Go to previous page')))), t('Prevoius page link found.')); } if ($up) { - $this->assertWantedRaw(l('up', 'node/' . $up->nid, array('attributes' => array('class' => 'page-up', 'title' => t('Go to parent page')))), t('Up page link found.')); + $this->assertRaw(l('up', 'node/' . $up->nid, array('attributes' => array('class' => 'page-up', 'title' => t('Go to parent page')))), t('Up page link found.')); } if ($next) { - $this->assertWantedRaw(l($next->title . ' ›', 'node/' . $next->nid, array('attributes' => array('class' => 'page-next', 'title' => t('Go to next page')))), t('Next page link found.')); + $this->assertRaw(l($next->title . ' ›', 'node/' . $next->nid, array('attributes' => array('class' => 'page-next', 'title' => t('Go to next page')))), t('Next page link found.')); } // Check printer friendly version. $this->drupalGet('book/export/html/' . $node->nid); $this->assertText($node->title, t('Printer friendly title found.')); $node->body = str_replace('', '', $node->body); - $this->assertWantedRaw(check_markup($node->body, $node->format), t('Printer friendly body found.')); + $this->assertRaw(check_markup($node->body, $node->format), t('Printer friendly body found.')); $number++; } Index: tests/functional/comment.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/comment.test,v retrieving revision 1.13 diff -u -p -r1.13 comment.test --- tests/functional/comment.test 30 Mar 2008 22:40:27 -0000 1.13 +++ tests/functional/comment.test 1 Apr 2008 07:54:46 -0000 @@ -151,19 +151,19 @@ class CommentTestCase extends DrupalTest $this->performCommentOperation($anonymous_comment3, 'unpublish'); $this->drupalGet('admin/content/comment/approval'); - $this->assertWantedRaw('comments['. $anonymous_comment3->id .']', t('Comment was unpublished.')); + $this->assertRaw('comments['. $anonymous_comment3->id .']', t('Comment was unpublished.')); // Publish comment. $this->performCommentOperation($anonymous_comment3, 'publish', TRUE); $this->drupalGet('admin/content/comment'); - $this->assertWantedRaw('comments['. $anonymous_comment3->id .']', t('Comment was published.')); + $this->assertRaw('comments['. $anonymous_comment3->id .']', t('Comment was published.')); // Delete comment. $this->performCommentOperation($anonymous_comment3, 'delete'); $this->drupalGet('admin/content/comment'); - $this->assertNoUnwantedRaw('comments['. $anonymous_comment3->id .']', t('Comment was deleted.')); + $this->assertNoRaw('comments['. $anonymous_comment3->id .']', t('Comment was deleted.')); // Set anonymouse comments to require approval. $this->setAnonymousUserComment(TRUE, FALSE); Index: tests/functional/contact.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/contact.test,v retrieving revision 1.9 diff -u -p -r1.9 contact.test --- tests/functional/contact.test 29 Mar 2008 21:40:59 -0000 1.9 +++ tests/functional/contact.test 1 Apr 2008 08:06:20 -0000 @@ -48,19 +48,19 @@ class ContactTestCase extends DrupalTest $invalid_recipients = array('invalid', 'invalid@', /*'invalid@site', 'invalid@site.',*/ '@site.', '@site.com'); foreach ($invalid_recipients as $invalid_recipient) { $this->addCategory($this->randomName(16), $invalid_recipient, '', FALSE); - $this->assertWantedRaw(t('%recipient is an invalid e-mail address.', array('%recipient' => $invalid_recipient)), t('Caught invalid recipient ('. $invalid_recipient .').')); + $this->assertRaw(t('%recipient is an invalid e-mail address.', array('%recipient' => $invalid_recipient)), t('Caught invalid recipient ('. $invalid_recipient .').')); } // Create valid categories. $recipients = array('simpletest@test.com', 'simpletest2@test.com', 'simpletest3@test.com'); $this->addCategory($category = $this->randomName(16), implode(',', array($recipients[0])), '', TRUE); - $this->assertWantedRaw(t('Category %category has been added.', array('%category' => $category)), t('Category successfully added.')); + $this->assertRaw(t('Category %category has been added.', array('%category' => $category)), t('Category successfully added.')); $this->addCategory($category = $this->randomName(16), implode(',', array($recipients[0], $recipients[1])), '', FALSE); - $this->assertWantedRaw(t('Category %category has been added.', array('%category' => $category)), t('Category successfully added.')); + $this->assertRaw(t('Category %category has been added.', array('%category' => $category)), t('Category successfully added.')); $this->addCategory($category = $this->randomName(16), implode(',', array($recipients[0], $recipients[1], $recipients[2])), '', FALSE); - $this->assertWantedRaw(t('Category %category has been added.', array('%category' => $category)), t('Category successfully added.')); + $this->assertRaw(t('Category %category has been added.', array('%category' => $category)), t('Category successfully added.')); // Clear food table in preparation for flood test and allow other checks to complete. $this->assertTrue(db_query('DELETE FROM {flood}'), t('Flood table emptied.')); @@ -107,7 +107,7 @@ class ContactTestCase extends DrupalTest } // Submit contact form one over limit. $this->drupalGet('contact'); - $this->assertWantedRaw(t('You cannot send more than %number messages per hour. Please try again later.', array('%number' => $edit['contact_hourly_threshold'])), t('Message threshold reached.')); + $this->assertRaw(t('You cannot send more than %number messages per hour. Please try again later.', array('%number' => $edit['contact_hourly_threshold'])), t('Message threshold reached.')); // Delete created categories. $this->drupalLogin($admin_user); @@ -214,7 +214,7 @@ class ContactTestCase extends DrupalTest foreach ($categories as $category) { $category_name = db_result(db_query('SELECT category FROM {contact} WHERE cid = %d', array($category))); $this->drupalPost('admin/build/contact/delete/'. $category, array(), t('Delete')); - $this->assertWantedRaw(t('Category %category has been deleted.', array('%category' => $category_name)), t('Category deleted sucessfully.')); + $this->assertRaw(t('Category %category has been deleted.', array('%category' => $category_name)), t('Category deleted sucessfully.')); } } Index: tests/functional/filter.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/filter.test,v retrieving revision 1.8 diff -u -p -r1.8 filter.test --- tests/functional/filter.test 24 Mar 2008 02:36:46 -0000 1.8 +++ tests/functional/filter.test 1 Apr 2008 07:54:46 -0000 @@ -41,7 +41,7 @@ class FilterTestCase extends DrupalTestC $this->drupalPost('admin/settings/filters', $edit, t('Save changes')); $this->assertText(t('Default format updated.'), 'Default filter updated successfully.'); - $this->assertNoUnwantedRaw('admin/settings/filters/delete/'. $full, 'Delete link not found.'); + $this->assertNoRaw('admin/settings/filters/delete/'. $full, 'Delete link not found.'); // Add an additional tag. $edit = array(); @@ -49,7 +49,7 @@ class FilterTestCase extends DrupalTestC $this->drupalPost('admin/settings/filters/'. $filtered .'/configure', $edit, t('Save configuration')); $this->assertText(t('The configuration options have been saved.'), 'Allowed HTML tag added.'); - $this->assertWantedRaw(htmlentities($edit['allowed_html_1']), 'Tag displayed.'); + $this->assertRaw(htmlentities($edit['allowed_html_1']), 'Tag displayed.'); $result = db_fetch_object(db_query('SELECT * FROM {cache_filter}')); $this->assertFalse($result, 'Cache cleared.'); @@ -77,7 +77,7 @@ class FilterTestCase extends DrupalTestC $edit['filters[filter/'. $second_filter .']'] = TRUE; $edit['filters[filter/'. $first_filter .']'] = TRUE; $this->drupalPost('admin/settings/filters/add', $edit, t('Save configuration')); - $this->assertWantedRaw(t('Added input format %format.', array('%format' => $edit['name'])), 'New filter created.'); + $this->assertRaw(t('Added input format %format.', array('%format' => $edit['name'])), 'New filter created.'); $format = $this->getFilter($edit['name']); $this->assertNotNull($format, 'Format found in database.'); @@ -93,7 +93,7 @@ class FilterTestCase extends DrupalTestC // Delete new filter. $this->drupalPost('admin/settings/filters/delete/'. $format->format, array(), t('Delete')); - $this->assertWantedRaw(t('Deleted input format %format.', array('%format' => $edit['name'])), 'Format successfully deleted.'); + $this->assertRaw(t('Deleted input format %format.', array('%format' => $edit['name'])), 'Format successfully deleted.'); } // Change default filter back. @@ -102,7 +102,7 @@ class FilterTestCase extends DrupalTestC $this->drupalPost('admin/settings/filters', $edit, t('Save changes')); $this->assertText(t('Default format updated.'), 'Default filter updated successfully.'); - $this->assertNoUnwantedRaw('admin/settings/filters/delete/'. $filtered, 'Delete link not found.'); + $this->assertNoRaw('admin/settings/filters/delete/'. $filtered, 'Delete link not found.'); // Allow authenticated users on full HTML. $edit = array(); @@ -127,7 +127,7 @@ class FilterTestCase extends DrupalTestC $edit['format'] = $filtered; $this->drupalPost('node/add/page', $edit, t('Save')); $message = ($version_five ? t('Your %post has been created.', array('%post' => 'Page')) : t('Page %title has been created.', array('%title' => $edit['title']))); - $this->assertWantedRaw($message, 'Filtered node created.'); + $this->assertRaw($message, 'Filtered node created.'); $node = node_load(array('title' => $edit['title'])); $this->assertTrue($node, 'Node found in database.'); Index: tests/functional/forum.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/forum.test,v retrieving revision 1.9 diff -u -p -r1.9 forum.test --- tests/functional/forum.test 24 Mar 2008 02:36:46 -0000 1.9 +++ tests/functional/forum.test 1 Apr 2008 07:54:46 -0000 @@ -33,7 +33,7 @@ class ForumTestCase extends DrupalTestCa // Double check that the page says it has created the container $this->drupalPost('admin/content/forum/add/container', $edit, t('Save')); $type = t('forum container'); - $this->assertWantedRaw(t('Created new @type %term.', array('%term' => $title, '@type' => $type)), t('New forum container has been created')); + $this->assertRaw(t('Created new @type %term.', array('%term' => $title, '@type' => $type)), t('New forum container has been created')); // Grab the newly created container $term = db_fetch_array(db_query("SELECT * FROM {term_data} t WHERE t.vid = %d AND t.name = '%s' AND t.description = '%s'", variable_get('forum_nav_vocabulary', ''), $title, $description)); @@ -59,7 +59,7 @@ class ForumTestCase extends DrupalTestCa // Double check that the page says it has created the forum $this->drupalPost('admin/content/forum/add/forum', $edit, t('Save')); $type = t('forum'); - $this->assertWantedRaw(t('Created new @type %term.', array('%term' => $title, '@type' => $type)), t('New forum has been created')); + $this->assertRaw(t('Created new @type %term.', array('%term' => $title, '@type' => $type)), t('New forum has been created')); // Grab the newly created forum $term = db_fetch_array(db_query("SELECT * FROM {term_data} t WHERE t.vid = %d AND t.name = '%s' AND t.description = '%s'", variable_get('forum_nav_vocabulary', ''), $title, $description)); @@ -144,7 +144,7 @@ class EditForumTaxonomyTestCase extends // Double check that the page says it has edited the vocabulary $this->drupalPost('admin/content/taxonomy/edit/vocabulary/'. $vid, $edit, t('Save')); - $this->assertWantedRaw(t('Updated vocabulary %name.', array('%name' => $title)), t('Vocabulary has been edited')); + $this->assertRaw(t('Updated vocabulary %name.', array('%name' => $title)), t('Vocabulary has been edited')); // Grab the newly edited vocabulary $cur_settings = db_fetch_array(db_query('SELECT v.* FROM {vocabulary} v WHERE v.vid = %d', $vid)); @@ -194,15 +194,15 @@ class AddTopicToForumTestCase extends Fo // Double check that the page says it has created the topic $this->drupalPost('node/add/forum/'. $forum['tid'], $edit, t('Save')); $type = t('Forum topic'); - $this->assertWantedRaw(t('@type %term has been created.', array('%term' => $title, '@type' => $type)), t('New forum topic has been created')); - $this->assertNoUnwantedRaw(t('The item %term is only a container for forums.', array('%term' => $forum['name'])), t('No error message shown')); + $this->assertRaw(t('@type %term has been created.', array('%term' => $title, '@type' => $type)), t('New forum topic has been created')); + $this->assertNoRaw(t('The item %term is only a container for forums.', array('%term' => $forum['name'])), t('No error message shown')); // Then find the new topic, load it, and make sure the text we chose appears $new_topic = node_load(array('title' => $title), null, true); $this->drupalGet("node/$new_topic->nid"); - $this->assertWantedRaw($title, t('Looking for subject text')); - $this->assertWantedRaw($description, t('Looking for body text')); + $this->assertRaw($title, t('Looking for subject text')); + $this->assertRaw($description, t('Looking for body text')); // Delete the topic node_delete($new_topic->nid); @@ -237,8 +237,8 @@ class AddTopicToForumTestCase extends Fo // Double check that the page says it hasn't created the topic $this->drupalPost('node/add/forum/'. $container['tid'], $edit, t('Save')); $type = t('Forum topic'); - $this->assertNoUnwantedRaw(t('@type %term has been created.', array('%term' => $title, '@type' => $type)), t('No "new forum has been created" message')); - $this->assertWantedRaw(t('The item %term is only a container for forums.', array('%term' => $container['name'])), t('Error message shown')); + $this->assertNoRaw(t('@type %term has been created.', array('%term' => $title, '@type' => $type)), t('No "new forum has been created" message')); + $this->assertRaw(t('The item %term is only a container for forums.', array('%term' => $container['name'])), t('Error message shown')); // Then make sure the node does not exist $new_topic = node_load(array('title' => $title), null, true); @@ -275,8 +275,8 @@ class AddTopicToForumTestCase extends Fo // Double check that the page says it has created the topic $this->drupalPost('node/add/forum/'. $forum1['tid'], $edit, t('Save')); $type = t('Forum topic'); - $this->assertWantedRaw(t('@type %term has been created.', array('%term' => $title, '@type' => $type)), t('New forum topic has been created')); - $this->assertNoUnwantedRaw(t('The item %term is only a container for forums.', array('%term' => $forum1['name'])), t('No error message shown')); + $this->assertRaw(t('@type %term has been created.', array('%term' => $title, '@type' => $type)), t('New forum topic has been created')); + $this->assertNoRaw(t('The item %term is only a container for forums.', array('%term' => $forum1['name'])), t('No error message shown')); // Then find the new topic and edit it to move it $new_topic = node_load(array('title' => $title), null, true); @@ -292,9 +292,9 @@ class AddTopicToForumTestCase extends Fo // Also, double check that the new forum name is there and not the old $this->drupalPost('node/'. $new_topic->nid .'/edit', $edit, t('Save')); $type = t('Forum topic'); - $this->assertWantedRaw(t('@type %term has been updated.', array('%term' => $title, '@type' => $type)), t('Topic has been moved')); - $this->assertWantedRaw($forum2['name'], t('New forum name is present')); - $this->assertNoUnwantedRaw($forum1['name'], t('Old forum name is not present')); + $this->assertRaw(t('@type %term has been updated.', array('%term' => $title, '@type' => $type)), t('Topic has been moved')); + $this->assertRaw($forum2['name'], t('New forum name is present')); + $this->assertNoRaw($forum1['name'], t('Old forum name is not present')); // Delete the topic node_delete($new_topic->nid); @@ -332,8 +332,8 @@ class AddTopicToForumTestCase extends Fo // Double check that the page says it has created the topic $this->drupalPost('node/add/forum/'. $forum1['tid'], $edit, t('Save')); $type = t('Forum topic'); - $this->assertWantedRaw(t('@type %term has been created.', array('%term' => $title, '@type' => $type)), t('New forum topic has been created')); - $this->assertNoUnwantedRaw(t('The item %term is only a container for forums.', array('%term' => $forum1['name'])), t('No error message shown')); + $this->assertRaw(t('@type %term has been created.', array('%term' => $title, '@type' => $type)), t('New forum topic has been created')); + $this->assertNoRaw(t('The item %term is only a container for forums.', array('%term' => $forum1['name'])), t('No error message shown')); // Then find the new topic and edit it to move it $new_topic = node_load(array('title' => $title), null, true); @@ -349,9 +349,9 @@ class AddTopicToForumTestCase extends Fo // Also, double check that the new forum name is there and not the old $this->drupalPost('node/'. $new_topic->nid .'/edit', $edit, t('Save')); $type = t('Forum topic'); - $this->assertWantedRaw(t('@type %term has been updated.', array('%term' => $title, '@type' => $type)), t('Topic has been moved')); - $this->assertWantedRaw($forum2['name'], t('New forum name is present')); - $this->assertNoUnwantedRaw($forum1['name'], t('Old forum name is not present')); + $this->assertRaw(t('@type %term has been updated.', array('%term' => $title, '@type' => $type)), t('Topic has been moved')); + $this->assertRaw($forum2['name'], t('New forum name is present')); + $this->assertNoRaw($forum1['name'], t('Old forum name is not present')); // Delete the topic node_delete($new_topic->nid); Index: tests/functional/locale.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/locale.test,v retrieving revision 1.8 diff -u -p -r1.8 locale.test --- tests/functional/locale.test 24 Mar 2008 02:36:46 -0000 1.8 +++ tests/functional/locale.test 1 Apr 2008 07:54:46 -0000 @@ -75,7 +75,7 @@ class LocaleTestCase extends DrupalTestC // found, so this is not a false assert. See how assertNoText succeeds // later. $this->assertText($name, 'Search found the name'); - $this->assertWantedRaw($language_indicator, 'Name is untranslated'); + $this->assertRaw($language_indicator, 'Name is untranslated'); // It's presumed that this is the only result. Given the random name, it's // reasonable. $this->clickLink(t('edit')); @@ -91,7 +91,7 @@ class LocaleTestCase extends DrupalTestC $this->assertTrue($name != $translation && t($name, array(), $langcode) == $translation, 't() works'); $this->drupalPost('admin/build/translate/search', $search, t('Search')); // The indicator should not be here. - $this->assertNoUnwantedRaw($language_indicator, 'String is translated'); + $this->assertNoRaw($language_indicator, 'String is translated'); $this->drupalGet('logout'); // Delete the language @@ -100,7 +100,7 @@ class LocaleTestCase extends DrupalTestC // This a confirm form, we do not need any fields changed. $this->drupalPost($path, array(), t('Delete')); // We need raw here because %locale will add HTML. - $this->assertWantedRaw(t('The language %locale has been removed.', array('%locale' => $name)), 'The test language has been removed.'); + $this->assertRaw(t('The language %locale has been removed.', array('%locale' => $name)), 'The test language has been removed.'); // Reload to remove $name. $this->drupalGet($path); $this->assertNoText($langcode, 'Language code not found'); Index: tests/functional/menu.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/menu.test,v retrieving revision 1.7 diff -u -p -r1.7 menu.test --- tests/functional/menu.test 24 Mar 2008 02:36:46 -0000 1.7 +++ tests/functional/menu.test 1 Apr 2008 07:54:46 -0000 @@ -225,7 +225,7 @@ class MenuResetTestCase extends DrupalTe $this->assertTrue($new_title == $edit['menu[link_title]'], 'Edit succesful'); $this->assertFalse($item['link_title'] == $new_title, 'Item changed' ); $reset_path = $path .'/reset'; - $this->assertWantedRaw($reset_path, 'Reset link found'); + $this->assertRaw($reset_path, 'Reset link found'); $this->drupalPost($reset_path, array(), t('Reset')); $reset_title = db_result(db_query('SELECT link_title FROM {menu_links} WHERE mlid = %d', $mlid)); $this->assertFalse($edit['menu[link_title]'] == $reset_title, 'Item reset'); @@ -269,7 +269,7 @@ class MenuInvalidPathTestCase extends Dr 'menu[link_title]' => 'title', ); $this->drupalPost('admin/build/menu-customize/navigation/add', $edit, t('Save')); - $this->assertWantedRaw(t("The path '@path' is either invalid or you do not have access to it.", array('@path' => $invalid_path)), 'Invalid path failed'); + $this->assertRaw(t("The path '@path' is either invalid or you do not have access to it.", array('@path' => $invalid_path)), 'Invalid path failed'); } } } Index: tests/functional/node.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/node.test,v retrieving revision 1.10 diff -u -p -r1.10 node.test --- tests/functional/node.test 26 Mar 2008 22:12:36 -0000 1.10 +++ tests/functional/node.test 1 Apr 2008 07:54:46 -0000 @@ -292,9 +292,9 @@ class PageEditTestCase extends DrupalTes $acturl = $this->getURL(); $this->assertEqual($editurl, $acturl); - $this->assertWantedText(t('Edit'), 'Edit text is here'); - $this->assertWantedText(t($edit['title']), 'Hello, the random title'); - $this->assertWantedText(t($edit['body']), 'test is over, the body\'s still there'); + $this->assertText(t('Edit'), 'Edit text is here'); + $this->assertText(t($edit['title']), 'Hello, the random title'); + $this->assertText(t($edit['body']), 'test is over, the body\'s still there'); $edit = array( 'title' => '!SimpleTest! test title' . $this->randomName(20), @@ -305,8 +305,8 @@ class PageEditTestCase extends DrupalTes //edit the content of the page $this->drupalPost("node/$node->nid/edit", $edit, t('Save')); - $this->assertWantedText(t($edit['title']), 'Hello, the random title'); - $this->assertWantedText(t($edit['body']), 'test is over, the body\'s still there'); + $this->assertText(t($edit['title']), 'Hello, the random title'); + $this->assertText(t($edit['body']), 'test is over, the body\'s still there'); } } @@ -332,9 +332,9 @@ class PagePreviewTestCase extends Drupal ); $this->drupalPost('node/add/page', $edit, t('Preview')); - $this->assertWantedText(t('Preview'), 'Preview text is here'); - $this->assertWantedText(t($edit['title']), 'Hello, the random title'); - $this->assertWantedText(t($edit['body']), 'test is over, the body\'s still there'); + $this->assertText(t('Preview'), 'Preview text is here'); + $this->assertText(t($edit['title']), 'Hello, the random title'); + $this->assertText(t($edit['body']), 'test is over, the body\'s still there'); $this->assertFieldByName('title', $edit['title'], 'The title is on it\'s place'); @@ -368,7 +368,7 @@ class PageCreationTestCase extends Drup $edit['body'] = '!SimpleTest test body! ' . $this->randomName(32) . ' ' . $this->randomName(32); $this->drupalPost('node/add/page', $edit, t('Save')); - $this->assertWantedRaw(t('!post %title has been created.', array ('!post' => 'Page', '%title' => $edit['title'])), 'Page created'); + $this->assertRaw(t('!post %title has been created.', array ('!post' => 'Page', '%title' => $edit['title'])), 'Page created'); $node = node_load(array('title' => $edit['title'])); $this->assertNotNull($node, t('Node !title found in database.', array ('!title' => $edit['title']))); Index: tests/functional/path.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/path.test,v retrieving revision 1.7 diff -u -p -r1.7 path.test --- tests/functional/path.test 23 Mar 2008 22:06:32 -0000 1.7 +++ tests/functional/path.test 1 Apr 2008 07:54:46 -0000 @@ -65,7 +65,7 @@ class PathModuleTestCase extends DrupalT $this->drupalPost('admin/build/path/add', $edit, t('Create new alias')); // confirm that the alias didn't make a duplicate - $this->assertWantedRaw(t('The alias %alias is already in use in this language.', array('%alias' => $edit['dst'])), 'Attempt to move alias was rejected.'); + $this->assertRaw(t('The alias %alias is already in use in this language.', array('%alias' => $edit['dst'])), 'Attempt to move alias was rejected.'); // delete alias $this->drupalPost('admin/build/path/delete/' . $pid, array(), t('Confirm')); Index: tests/functional/poll.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/poll.test,v retrieving revision 1.8 diff -u -p -r1.8 poll.test --- tests/functional/poll.test 24 Mar 2008 02:36:46 -0000 1.8 +++ tests/functional/poll.test 1 Apr 2008 07:54:46 -0000 @@ -29,13 +29,13 @@ class PollTestCase extends DrupalTestCas for ($i = 0; $i <= 6; $i++) { $bar = theme('poll_bar', $edit['choice['. $i .'][chtext]'], NULL, 0, FALSE, FALSE); $this->assertTrue($bar, "bar $i is themed"); - $this->assertWantedRaw($bar, "bar $i found in preview"); + $this->assertRaw($bar, "bar $i found in preview"); } } $this->drupalPost(NULL, $edit, t('Save')); $node = node_load(array('title' => $title)); $this->nid = $node->nid; - $this->assertWantedRaw(t('@type %title has been created.', array('@type' => node_get_types('name', 'poll'), '%title' => $title)), 'Poll has been created.'); + $this->assertRaw(t('@type %title has been created.', array('@type' => node_get_types('name', 'poll'), '%title' => $title)), 'Poll has been created.'); $this->assertTrue($this->nid, t('Poll has been found in the database')); } Index: tests/functional/profile.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/profile.test,v retrieving revision 1.7 diff -u -p -r1.7 profile.test --- tests/functional/profile.test 24 Mar 2008 02:36:46 -0000 1.7 +++ tests/functional/profile.test 1 Apr 2008 07:54:46 -0000 @@ -80,9 +80,9 @@ class ProfileTestSingleTestCase extends // checking field $this->assertField($form_name , t('Found form named @name', array('@name' => $form_name))); // checking name - $this->assertWantedText($title, "Checking title for ". $title); + $this->assertText($title, "Checking title for ". $title); // checking explanation - $this->assertWantedText($explanation, "Checking explanation for ". $title); + $this->assertText($explanation, "Checking explanation for ". $title); // ok, now let put some data unset($edit); @@ -93,17 +93,17 @@ class ProfileTestSingleTestCase extends $this->drupalGet("user/". $user->uid); // checking profile page - $this->assertWantedText($edit[$form_name], "Checking ". $edit[$form_name]); - $this->assertWantedText($title, "Checking $title"); + $this->assertText($edit[$form_name], "Checking ". $edit[$form_name]); + $this->assertText($title, "Checking $title"); // update field $new_title = $this->randomName(20); $this->drupalPost("admin/user/profile/edit/$fid", array('title' => $new_title), t('Save field') , 0); $this->drupalGet("admin/user/profile"); - $this->assertWantedText($new_title, "Checking updated field"); + $this->assertText($new_title, "Checking updated field"); // deleting field $this->drupalPost("admin/user/profile/delete/$fid", array(), t('Delete'), 0); $this->drupalGet("admin/user/profile"); - $this->assertNoUnwantedText($new_title, "Checking deleted field $title"); + $this->assertNoText($new_title, "Checking deleted field $title"); // delete test user and roles if ($user->uid > 0) { @@ -194,9 +194,9 @@ class ProfileTestTextareaTestCase extend // checking field $this->assertField($form_name, ''); // checking name - $this->assertWantedText($title, "Checking title for ". $title); + $this->assertText($title, "Checking title for ". $title); // checking explanation - $this->assertWantedText($explanation, "Checking explanation for ". $title); + $this->assertText($explanation, "Checking explanation for ". $title); // ok, now let put some data unset($edit); @@ -207,17 +207,17 @@ class ProfileTestTextareaTestCase extend $this->drupalGet("user/". $user->uid); // checking profile page - $this->assertWantedText($edit[$form_name], "Checking ". $edit[$form_name]); - $this->assertWantedText($title, "Checking $title"); + $this->assertText($edit[$form_name], "Checking ". $edit[$form_name]); + $this->assertText($title, "Checking $title"); // update field $new_title = $this->randomName(20); $this->drupalPost("admin/user/profile/edit/$fid", array('title' => $new_title), t('Save field'), 0); $this->drupalGet("admin/user/profile"); - $this->assertWantedText($new_title, "Checking updated field"); + $this->assertText($new_title, "Checking updated field"); // deleting field $this->drupalPost("admin/user/profile/delete/$fid", array(), t('Delete'), 0); $this->drupalGet("admin/user/profile"); - $this->assertNoUnwantedText($new_title, "Checking deleted field $title"); + $this->assertNoText($new_title, "Checking deleted field $title"); // delete test user and roles if ($user->uid > 0) { @@ -308,9 +308,9 @@ class ProfileTestFreelistTestCase extend // checking field $this->assertField($form_name, ''); // checking name - $this->assertWantedText($title, "Checking title for ". $title); + $this->assertText($title, "Checking title for ". $title); // checking explanation - $this->assertWantedText($explanation, "Checking explanation for ". $title); + $this->assertText($explanation, "Checking explanation for ". $title); // ok, now let put some data unset($edit); @@ -321,17 +321,17 @@ class ProfileTestFreelistTestCase extend $this->drupalGet("user/". $user->uid); // checking profile page - $this->assertWantedText($edit[$form_name], "Checking ". $edit[$form_name]); - $this->assertWantedText($title, "Checking $title"); + $this->assertText($edit[$form_name], "Checking ". $edit[$form_name]); + $this->assertText($title, "Checking $title"); // update field $new_title = $this->randomName(20); $this->drupalPost("admin/user/profile/edit/$fid", array('title' => $new_title), t('Save field'), 0); $this->drupalGet("admin/user/profile"); - $this->assertWantedText($new_title, "Checking updated field"); + $this->assertText($new_title, "Checking updated field"); // deleting field $this->drupalPost("admin/user/profile/delete/$fid", array(), t('Delete'), 0); $this->drupalGet("admin/user/profile"); - $this->assertNoUnwantedText($new_title, "Checking deleted field $title"); + $this->assertNoText($new_title, "Checking deleted field $title"); // delete test user and roles if ($user->uid > 0) { @@ -423,9 +423,9 @@ class ProfileTestCheckboxTestCase extend // checking field $this->assertField($form_name, false); // checking name - $this->assertWantedText($title, "Checking title for ". $title); + $this->assertText($title, "Checking title for ". $title); // checking explanation - $this->assertWantedText($explanation, "Checking explanation for ". $title); + $this->assertText($explanation, "Checking explanation for ". $title); // ok, now let put some data unset($edit); @@ -435,17 +435,17 @@ class ProfileTestCheckboxTestCase extend $this->drupalPost("user/". $user->uid. "/edit/$my_category", $edit, t('Save'), 0); $this->drupalGet("user/". $user->uid); // checking profile page - $this->assertWantedText($title, "Checking checkbox"); - $this->assertWantedText($title, "Checking $title"); + $this->assertText($title, "Checking checkbox"); + $this->assertText($title, "Checking $title"); // update field $new_title = $this->randomName(10); $this->drupalPost("admin/user/profile/edit/$fid", array('title' => $new_title), t('Save field'), 0); $this->drupalGet("admin/user/profile"); - $this->assertWantedText($new_title, "Checking updated field"); + $this->assertText($new_title, "Checking updated field"); // deleting field $this->drupalPost("admin/user/profile/delete/$fid", array(), t('Delete'), 0); $this->drupalGet("admin/user/profile"); - $this->assertNoUnwantedText($new_title, "Checking deleted field $title"); + $this->assertNoText($new_title, "Checking deleted field $title"); // delete test user and roles if ($user->uid > 0) { @@ -536,9 +536,9 @@ class ProfileTestUrlTestCase extends Dru // checking field $this->assertField($form_name, ''); // checking name - $this->assertWantedText($title, "Checking title for ". $title); + $this->assertText($title, "Checking title for ". $title); // checking explanation - $this->assertWantedText($explanation, "Checking explanation for ". $title); + $this->assertText($explanation, "Checking explanation for ". $title); // ok, now let put some data unset($edit); @@ -549,17 +549,17 @@ class ProfileTestUrlTestCase extends Dru $this->drupalGet("user/". $user->uid); // checking profile page - $this->assertWantedText($edit[$form_name], "Checking ". $edit[$form_name]); - $this->assertWantedText($title, "Checking $title"); + $this->assertText($edit[$form_name], "Checking ". $edit[$form_name]); + $this->assertText($title, "Checking $title"); // update field $new_title = $this->randomName(20); $this->drupalPost("admin/user/profile/edit/$fid", array('title' => $new_title), t('Save field'), 0); $this->drupalGet("admin/user/profile"); - $this->assertWantedText($new_title, "Checking updated field"); + $this->assertText($new_title, "Checking updated field"); // deleting field $this->drupalPost("admin/user/profile/delete/$fid", array(), t('Delete'), 0); $this->drupalGet("admin/user/profile"); - $this->assertNoUnwantedText($new_title, "Checking deleted field $title"); + $this->assertNoText($new_title, "Checking deleted field $title"); // delete test user and roles if ($user->uid > 0) { @@ -650,9 +650,9 @@ class ProfileTestSelectionTestCase exten // checking simple fields $this->drupalGet("user/". $user->uid. "/edit/$my_category"); // checking name - $this->assertWantedText($title, "Checking title for ". $title); + $this->assertText($title, "Checking title for ". $title); // checking explanation - $this->assertWantedText($explanation, "Checking explanation for ". $title); + $this->assertText($explanation, "Checking explanation for ". $title); // can we choose something which doesn't come from the list ? //$this->assertFalse($this->setField('edit['.$form_name .']', $this->randomName(10))); // or can we choose each of our options @@ -672,17 +672,17 @@ class ProfileTestSelectionTestCase exten $this->drupalGet("user/". $user->uid); // checking profile page - $this->assertWantedText($edit[$form_name], "Checking ". $edit[$form_name]); - $this->assertWantedText($title, "Checking $title"); + $this->assertText($edit[$form_name], "Checking ". $edit[$form_name]); + $this->assertText($title, "Checking $title"); // update field $new_title = $this->randomName(20); $this->drupalPost("admin/user/profile/edit/$fid", array('title' => $new_title), t('Save field'), 0); $this->drupalGet("admin/user/profile"); - $this->assertWantedText($new_title, "Checking updated field"); + $this->assertText($new_title, "Checking updated field"); // deleting field $this->drupalPost("admin/user/profile/delete/$fid", array(), t('Delete'), 0); $this->drupalGet("admin/user/profile"); - $this->assertNoUnwantedText($new_title, "Checking deleted field $title"); + $this->assertNoText($new_title, "Checking deleted field $title"); // delete test user and roles if ($user->uid > 0) { @@ -775,9 +775,9 @@ class ProfileTestDateTestCase extends Dr // checking simple fields $this->drupalGet("user/". $user->uid. "/edit/$my_category"); // checking name - $this->assertWantedText($title, "Checking title for ". $title); + $this->assertText($title, "Checking title for ". $title); // checking explanation - $this->assertWantedText($explanation, "Checking explanation for ". $title); + $this->assertText($explanation, "Checking explanation for ". $title); // checking days/month/years //foreach(array('year', 'month', 'day') as $field) //$this->assertFalse($this->setField('edit['.$form_name .']['. $field .']', $this->randomName(4)), 'Checking data field ['.$field.']'); @@ -801,17 +801,17 @@ class ProfileTestDateTestCase extends Dr $this->drupalGet("user/". $user->uid); // checking profile page - $this->assertWantedText($data, "Checking date $data"); - $this->assertWantedText($title, "Checking $title"); + $this->assertText($data, "Checking date $data"); + $this->assertText($title, "Checking $title"); // update field $new_title = $this->randomName(20); $this->drupalPost("admin/user/profile/edit/$fid", array('title' => $new_title), t('Save field'), 0); $this->drupalGet("admin/user/profile"); - $this->assertWantedText($new_title, "Checking updated field"); + $this->assertText($new_title, "Checking updated field"); // deleting field $this->drupalPost("admin/user/profile/delete/$fid", array(), t('Delete'), 0); $this->drupalGet("admin/user/profile"); - $this->assertNoUnwantedText($new_title, "Checking deleted field $title"); + $this->assertNoText($new_title, "Checking deleted field $title"); // delete test user and roles if ($user->uid > 0) { @@ -920,8 +920,8 @@ class ProfileTest2TestCase extends Drupa // logout $this->drupalGet("logout"); $this->drupalGet("user/register"); - $this->assertNoUnwantedText($sfield1['title'], 'Field is not visible in registration form'); - $this->assertWantedText($sfield2['title'], 'Field is visible in registration form'); + $this->assertNoText($sfield1['title'], 'Field is not visible in registration form'); + $this->assertText($sfield2['title'], 'Field is visible in registration form'); // try to register $fname = $this->randomName(5, 'simpletest_'); $fmail = "$fname@drupaltest.example.com"; @@ -929,7 +929,7 @@ class ProfileTest2TestCase extends Drupa 'mail' => $fmail); $this->drupalPost('user/register', $edit, t('Create new account'), 0); //$key = t('The field %field is required.', array('%field' => $title)); - //$this->assertWantedText($key, 'Checking error message'); + //$this->assertText($key, 'Checking error message'); //log in $edit = array('name' => $name, 'pass' => $pass); $this->drupalPost('user', $edit, t('Log in'), 0); @@ -952,7 +952,7 @@ class ProfileTest2TestCase extends Drupa $title = str_replace("%value", $choice, $page_title); $this->assertTitle($title. ' | '. variable_get('site_name', 'Drupal'), "Checking title $title"); - $this->assertWantedText($title, "Checking $title in content"); + $this->assertText($title, "Checking $title in content"); $delete_fields[] = $fid; foreach($delete_fields as $delfid) { Index: tests/functional/system.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/system.test,v retrieving revision 1.8 diff -u -p -r1.8 system.test --- tests/functional/system.test 24 Mar 2008 02:36:46 -0000 1.8 +++ tests/functional/system.test 1 Apr 2008 07:54:46 -0000 @@ -61,7 +61,7 @@ class EnableCoreModuleTestCase extends D } $this->drupalPost('admin/build/modules/list/confirm', $edit, t('Save configuration')); - $this->assertWantedRaw(t('The configuration options have been saved.'), t('Ensure that the module status has been updated')); + $this->assertRaw(t('The configuration options have been saved.'), t('Ensure that the module status has been updated')); // Now, we check the tables for each module // We also refresh the module list and make sure the modules are enabled @@ -122,7 +122,7 @@ class EnableModuleWithoutDependencyTestC ); $this->drupalPost('admin/build/modules/list/confirm', $edit, t('Save configuration')); - $this->assertWantedRaw(t('Some required modules must be enabled'), t('Make sure the dependency error is shown')); + $this->assertRaw(t('Some required modules must be enabled'), t('Make sure the dependency error is shown')); $this->assertFalse(module_exists('forum'), t('Check to make sure that the module has not somehow become enabled')); } @@ -201,7 +201,7 @@ class DisableUninstallCoreModuleTestCase } $this->drupalPost('admin/build/modules/list/confirm', $edit, t('Save configuration')); - $this->assertWantedRaw(t('The configuration options have been saved.'), t('Ensure that the module status has been updated')); + $this->assertRaw(t('The configuration options have been saved.'), t('Ensure that the module status has been updated')); } // Now, lets make sure the modules are truly disabled and then try to uninstall them @@ -217,7 +217,7 @@ class DisableUninstallCoreModuleTestCase $this->drupalPost('admin/build/modules/uninstall/confirm', $edit, t('Uninstall')); // We need to confirm this by clicking again $this->drupalPost(NULL, array(), t('Uninstall')); - $this->assertWantedRaw(t('The selected modules have been uninstalled.'), 'Check to ensure that the modules have been removed'); + $this->assertRaw(t('The selected modules have been uninstalled.'), 'Check to ensure that the modules have been removed'); // Now, we check the tables for each module foreach ($modules_to_test as $module) { Index: tests/functional/taxonomy.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/taxonomy.test,v retrieving revision 1.8 diff -u -p -r1.8 taxonomy.test --- tests/functional/taxonomy.test 24 Mar 2008 02:36:46 -0000 1.8 +++ tests/functional/taxonomy.test 1 Apr 2008 07:54:46 -0000 @@ -351,7 +349,7 @@ class TaxonomyTestNodeApiTestCase extend $this->drupalPost('node/'. $node->nid .'/delete', array(), t('Delete')); // checking after delete $this->drupalGet("node/".$node->nid); - $this->assertNoUnwantedText($termname, "Checking if node exists"); + $this->assertNoText($termname, "Checking if node exists"); // checking database fields $num_rows = db_result(db_query('SELECT COUNT(*) FROM {term_node} WHERE nid = %d', $node->nid)); $this->assertEqual($num_rows, 0, 'Checking database field after deletion'); Index: tests/functional/translation.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/translation.test,v retrieving revision 1.8 diff -u -p -r1.8 translation.test --- tests/functional/translation.test 24 Mar 2008 02:23:10 -0000 1.8 +++ tests/functional/translation.test 1 Apr 2008 07:54:46 -0000 @@ -33,7 +33,7 @@ class TranslationModuleTestCase extends // Set story content type to use multilingual support with translation. $this->drupalPost('admin/content/node-type/story', array('language_content_type' => "2"), t('Save content type')); - $this->assertWantedRaw(t('The content type %type has been updated.', array('%type' => 'Story')), 'Story content type has been updated.'); + $this->assertRaw(t('The content type %type has been updated.', array('%type' => 'Story')), 'Story content type has been updated.'); $this->drupalGet('logout'); $this->drupalLogin($translator); @@ -51,18 +51,18 @@ class TranslationModuleTestCase extends $edit['body'] = 'Node body. Additional Text.'; $edit['translation[retranslate]'] = TRUE; $this->drupalPost('node/'. $node->nid .'/edit', $edit, t('Save')); - $this->assertWantedRaw(t('Story %title has been updated.', array('%title' => $node_title)), 'Original node updated.'); + $this->assertRaw(t('Story %title has been updated.', array('%title' => $node_title)), 'Original node updated.'); // Check to make sure that interface shows translation as outdated $this->drupalGet('node/'. $node->nid .'/translate'); - $this->assertWantedRaw(''. t('outdated') .'', 'Translation marked as outdated.'); + $this->assertRaw(''. t('outdated') .'', 'Translation marked as outdated.'); // Update translation and mark as updated. $edit = array(); $edit['body'] = 'Nodo cuerpo. Texto adicional.'; $edit['translation[status]'] = FALSE; $this->drupalPost('node/'. $node_trans->nid .'/edit', $edit, t('Save')); - $this->assertWantedRaw(t('Story %title has been updated.', array('%title' => $node_trans_title)), 'Translated node updated.'); + $this->assertRaw(t('Story %title has been updated.', array('%title' => $node_trans_title)), 'Translated node updated.'); } /** @@ -85,7 +85,7 @@ class TranslationModuleTestCase extends $this->assertTrue(array_key_exists($language_code, $languages), 'Language was installed successfully.'); if (array_key_exists($language_code, $languages)) { - $this->assertWantedRaw(t('The language %language has been created and can now be used. More information is available on the help screen.', array('%language' => $languages[$language_code]->name, '@locale-help' => url('admin/help/locale')))); + $this->assertRaw(t('The language %language has been created and can now be used. More information is available on the help screen.', array('%language' => $languages[$language_code]->name, '@locale-help' => url('admin/help/locale')))); } } else { @@ -93,7 +93,7 @@ class TranslationModuleTestCase extends $this->assertTrue(true, 'Language ['. $language_code .'] already installed.'); $this->drupalPost(NULL, array('enabled['. $language_code .']' => TRUE), t('Save configuration')); - $this->assertWantedRaw(t('Configuration saved.'), 'Language successfully enabled.'); + $this->assertRaw(t('Configuration saved.'), 'Language successfully enabled.'); } } @@ -113,7 +113,7 @@ class TranslationModuleTestCase extends $edit['language'] = $language; $this->drupalPost('node/add/story', $edit, t('Save')); - $this->assertWantedRaw(t('Story %title has been created.', array('%title' => $edit['title'])), 'Story created.'); + $this->assertRaw(t('Story %title has been created.', array('%title' => $edit['title'])), 'Story created.'); // Check to make sure the node was created. $node = node_load(array('title' => $edit['title'])); @@ -139,7 +139,7 @@ class TranslationModuleTestCase extends $this->drupalPost(NULL, $edit, t('Save')); - $this->assertWantedRaw(t('Story %title has been created.', array('%title' => $edit['title'])), 'Translation created.'); + $this->assertRaw(t('Story %title has been created.', array('%title' => $edit['title'])), 'Translation created.'); // Check to make sure that translation was successfull. $node = node_load(array('title' => $edit['title'])); Index: tests/functional/trigger.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/trigger.test,v retrieving revision 1.8 diff -u -p -r1.8 trigger.test --- tests/functional/trigger.test 24 Mar 2008 02:36:46 -0000 1.8 +++ tests/functional/trigger.test 1 Apr 2008 07:54:46 -0000 @@ -56,13 +56,13 @@ class ActionsContentTestCase extends Dr $edit = array('aid' => $hash); $this->drupalPost('admin/build/trigger/node', $edit, t('Assign')); - $this->assertWantedRaw(t('The action you chose is already assigned to that trigger.'), t('Check to make sure an error occurs when assigning an action to a trigger twice.')); + $this->assertRaw(t('The action you chose is already assigned to that trigger.'), t('Check to make sure an error occurs when assigning an action to a trigger twice.')); // Test 3: The action should be able to be unassigned from a trigger. // This effectively cleans up as well. $this->drupalPost('admin/build/trigger/unassign/nodeapi/presave/'. $hash, array(), t('Unassign')); - $this->assertWantedRaw(t('Action %action has been unassigned.', array('%action' => 'Publish post')), t('Check to make sure action can be unassigned from trigger.')); + $this->assertRaw(t('Action %action has been unassigned.', array('%action' => 'Publish post')), t('Check to make sure action can be unassigned from trigger.')); $assigned = db_result(db_query("SELECT COUNT(*) FROM {trigger_assignments} WHERE aid IN ('". implode("','", $content_actions) ."')")); $this->assertFalse($assigned, t('Check to make sure unassign worked properly at the database level.')); Index: tests/functional/upload.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/upload.test,v retrieving revision 1.12 diff -u -p -r1.12 upload.test --- tests/functional/upload.test 24 Mar 2008 02:36:46 -0000 1.12 +++ tests/functional/upload.test 1 Apr 2008 07:54:47 -0000 @@ -61,7 +61,7 @@ class UploadTestCase extends DrupalTestC $edit = array(); $edit['files['. $upload->fid .'][description]'] = $new_name = substr($upload->description, 1); $this->drupalPost('node/'. $node->nid .'/edit', $edit, t('Save')); - $this->assertWantedRaw(t('Page %title has been updated.', array('%title' => $node->title)), 'File renamed successfully.'); + $this->assertRaw(t('Page %title has been updated.', array('%title' => $node->title)), 'File renamed successfully.'); $this->assertText($new_name, $new_name .' found on node.'); $this->assertNoText($upload->description, $upload->description .' not found on node.'); @@ -70,7 +70,7 @@ class UploadTestCase extends DrupalTestC $edit = array(); $edit['files['. $upload->fid .'][remove]'] = TRUE; $this->drupalPost('node/'. $node->nid .'/edit', $edit, t('Save')); - $this->assertWantedRaw(t('Page %title has been updated.', array('%title' => $node->title)), 'File deleted successfully.'); + $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); @@ -91,7 +91,7 @@ class UploadTestCase extends DrupalTestC $edit = array(); $edit['files[upload]'] = $this->getFilePath($filename); $this->drupalPost('node/'. $node->nid .'/edit', $edit, t('Save')); - $this->assertWantedRaw(t('Page %title has been updated.', array('%title' => $node->title)), 'File attached successfully.'); + $this->assertRaw(t('Page %title has been updated.', array('%title' => $node->title)), 'File attached successfully.'); } /** @@ -156,7 +156,7 @@ class UploadPictureTestCase extends Drup $img_path = realpath(drupal_get_path('module', 'simpletest'). "/tests/functional/upload.test"); $edit = array('files[picture_upload]' => $img_path); $this->drupalPost('user/'.$user->uid.'/edit', $edit, t('Save')); - $this->assertWantedRaw(t('The selected file %file could not be uploaded. Only JPEG, PNG and GIF images are allowed.', array('%file' => 'upload.test')), 'The uploaded file was not an image.'); + $this->assertRaw(t('The selected file %file could not be uploaded. Only JPEG, PNG and GIF images are allowed.', array('%file' => 'upload.test')), 'The uploaded file was not an image.'); variable_set('user_pictures', $old_pic_set); // do we have to check users roles? @@ -210,7 +210,7 @@ class UploadPictureTestCase extends Drup $picture = file_create_url($pic_path); // check if image is displayed in user's profile page - $this->assertWantedRaw($picture, "Image is displayed in user's profile page"); + $this->assertRaw($picture, "Image is displayed in user's profile page"); // check if file is located in proper directory $this->assertTrue(is_file($pic_path), "File is located in proper directory"); @@ -266,7 +266,7 @@ class UploadPictureTestCase extends Drup $picture = file_create_url($pic_path); // check if image is displayed in user's profile page - $this->assertWantedRaw($picture, "Image is displayed in user's profile page"); + $this->assertRaw($picture, "Image is displayed in user's profile page"); // check if file is located in proper directory $this->assertTrue(is_file($pic_path), "File is located in proper directory"); @@ -312,7 +312,7 @@ class UploadPictureTestCase extends Drup $edit = array('picture' => $img_path); $this->drupalPost('user/'.$user->uid.'/edit', $edit, t('Save')); $text = t('The uploaded image is too large; the maximum dimensions are %dimensions pixels.', array('%dimensions' => variable_get('user_picture_dimensions', '85x85'))); - $this->assertWantedText($text, 'Checking response on invalid image (dimensions).'); + $this->assertText($text, 'Checking response on invalid image (dimensions).'); // check if file is not uploaded $file_dir = variable_get('file_directory_path', 'files'); @@ -361,7 +361,7 @@ class UploadPictureTestCase extends Drup $edit = array('picture' => $img_path); $this->drupalPost('user/'.$user->uid.'/edit', $edit, t('Save')); $text = t('The uploaded image is too large; the maximum file size is %size kB.', array('%size' => variable_get('user_picture_file_size', '30'))); - $this->assertWantedText($text, 'Checking response on invalid image size.'); + $this->assertText($text, 'Checking response on invalid image size.'); // check if file is not uploaded $file_dir = variable_get('file_directory_path', 'files'); Index: tests/functional/user.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/user.test,v retrieving revision 1.9 diff -u -p -r1.9 user.test --- tests/functional/user.test 24 Mar 2008 02:36:46 -0000 1.9 +++ tests/functional/user.test 1 Apr 2008 07:54:48 -0000 @@ -93,8 +93,8 @@ class UserRegistrationTestCase extends D $this->assertNoText(t('Sorry. Unrecognized username or password.'), 'Logged in (no message for unrecognized username or password)'); $this->assertNoText(t('User login'), 'Logged in (no user login form present)'); // I can't find this in Drupal anywhere, but I left it in for now. - $this->assertNoUnwantedRaw(t('The username %name has been blocked.', array('%name' => $pname)), 'Not blocked'); - $this->assertNoUnwantedRaw(t('The name %name is a reserved username.', array('%name' => $pname)), 'Access granted'); + $this->assertNoRaw(t('The username %name has been blocked.', array('%name' => $pname)), 'Not blocked'); + $this->assertNoRaw(t('The name %name is a reserved username.', array('%name' => $pname)), 'Access granted'); $this->drupalGet('user'); $this->assertText($pname, 'user as auth lands on the user profile'); @@ -196,7 +196,7 @@ class UserAccessTestCase extends DrupalT $this->drupalPost('user/register', $edit, t('Create new account')); - $this->assertNoUnWantedText(t('Your password and further instructions have been sent to your e-mail address.'), 'blocked user: Your password and further instructions - not found'); + $this->assertNoText(t('Your password and further instructions have been sent to your e-mail address.'), 'blocked user: Your password and further instructions - not found'); $this->assertText(t('The name @name has been denied access.', array('@name' => $name)), 'blocked user: denied access - found'); /* now try allowed user */ @@ -253,10 +253,10 @@ class UserDeleteTestCase extends DrupalT $this->drupalLogin($web_user); $this->drupalGet(url('user/'. $uid .'/edit', array('absolute' => TRUE))); $this->drupalPost(NULL, array(), t('Delete')); - $this->assertWantedRaw(t('Are you sure you want to delete the account %name?', array('%name' => $name)), 'Confirm title'); + $this->assertRaw(t('Are you sure you want to delete the account %name?', array('%name' => $name)), 'Confirm title'); $this->assertText(t('All submissions made by this user will be attributed to the anonymous account. This action cannot be undone.'), 'Confirm text'); $this->drupalPost(NULL, array(), t('Delete')); - $this->assertWantedRaw(t('%name has been deleted.', array('%name' => $name)), 'User deleted'); + $this->assertRaw(t('%name has been deleted.', array('%name' => $name)), 'User deleted'); $this->assertFalse(user_load($edit), 'User is not found in the database'); } }