Author: jablko
Date: Thu Sep 10 13:18:09 2009
New Revision: 3221
Log:
Try adding some tests for search behavior
Added:
trunk/test/functional/qubit/searchTest.php (contents, props changed)
Added: trunk/test/functional/qubit/searchTest.php
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/test/functional/qubit/searchTest.php Thu Sep 10 13:18:09 2009
(r3221)
@@ -0,0 +1,58 @@
+<?php
+
+include(dirname(__FILE__).'/../../bootstrap/functional.php');
+
+$browser = new sfTestFunctional(new sfBrowser);
+
+$informationObject = new QubitInformationObject;
+
+$informationObject->title = 'testtitle';
+$informationObject->save();
+
+$browser
+ ->get('/search/search?query=testtitle')
+
+ ->with('response')->begin()
+ ->checkElement('body', '/testtitle/')
+ ->end();
+
+$informationObject->title = 'TesTTItLe';
+$informationObject->save();
+
+$browser
+ ->get('/search/search?query=TEsTtiTLE')
+
+ ->with('response')->begin()
+ ->checkElement('body', '/TesTTItLe/')
+ ->end();
+
+// Issue 849
+$informationObject->title = 'testtitlé';
+$informationObject->save();
+
+$browser
+ ->get('/search/search?query=testtitle')
+
+ ->with('response')->begin()
+ ->checkElement('body', '/testtitlé/')
+ ->end();
+
+// Issue 848
+$informationObject->title = 'tEStTitLÉ';
+$informationObject->save();
+
+$browser
+ ->get('/search/search?query=teSTtiTle')
+
+ ->with('response')->begin()
+ ->checkElement('body', '/tEStTitLÉ/')
+ ->end();
+
+$informationObject->delete();
+
+$browser
+ ->get('/search/search?query=testtitle')
+
+ ->with('response')->begin()
+ ->checkElement('body', '!/testtitle/')
+ ->end();
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---