Author: rande
Date: 2010-02-22 23:33:21 +0100 (Mon, 22 Feb 2010)
New Revision: 28199

Modified:
   plugins/sfSolrPlugin/branches/sf1.2/test/unit/helper/sfLuceneHelperTest.php
Log:
[sfSolrPlugin] fix sfLuceneHelperTest

Modified: 
plugins/sfSolrPlugin/branches/sf1.2/test/unit/helper/sfLuceneHelperTest.php
===================================================================
--- plugins/sfSolrPlugin/branches/sf1.2/test/unit/helper/sfLuceneHelperTest.php 
2010-02-22 22:28:02 UTC (rev 28198)
+++ plugins/sfSolrPlugin/branches/sf1.2/test/unit/helper/sfLuceneHelperTest.php 
2010-02-22 22:33:21 UTC (rev 28199)
@@ -16,59 +16,10 @@
 
 require dirname(__FILE__) . '/../../bootstrap/unit.php';
 
-$t = new limeade_test(16, limeade_output::get());
+$t = new limeade_test(7, limeade_output::get());
 
 sfLoader::loadHelpers(array('sfLucene'));
 
-// intercepts includes to partials
-function include_partial($partial = null, $params = null, $dump = false)
-{
-  static $sPartial;
-  static $sParams;
-
-  if ($dump)
-  {
-    return array('partial' => $sPartial, 'params' => $sParams);
-  }
-
-  $sPartial = $partial;
-  $sParams = $params;
-}
-
-class Foo
-{
-  public function getInternalPartial()
-  {
-    return 'FooPartial';
-  }
-}
-class Bar
-{
-}
-
-$foo = new Foo;
-$bar = new Bar;
-
-$t->diag('testing partial dependencies');
-
-include_search_result($foo, 'query');
-$values = include_partial(null, null, true);
-$t->is($values['partial'], 'FooPartial', 'include_search_result() selects the 
correct partial');
-$t->ok($values['params']['result'] === $foo, 'include_search_result() sends 
the same result');
-$t->is($values['params']['query'], 'query', 'include_search_result() passes 
the query');
-
-include_search_controls($foo);
-$values = include_partial(null, null, true);
-$t->is($values['partial'], 'sfLucene/controls', 'include_search_controls() 
selects the correct partial');
-$t->ok($values['params']['form'] === $foo, 'include_search_controls() sends 
the same form');
-
-include_search_pager($foo, $bar, 8);
-$values = include_partial(null, null, true);
-$t->is($values['partial'], 'sfLucene/pagerNavigation', 'include_search_pager() 
selects the correct partial');
-$t->ok($values['params']['pager'] === $foo, 'include_search_pager() sends the 
same pager');
-$t->ok($values['params']['form'] === $bar, 'include_search_pager() sends the 
same form');
-$t->is($values['params']['radius'], 8, 'include_search_pager() sends the 
correct radius');
-
 $t->diag('testing highlighting');
 
 $t->is(highlight_result_text('Hello.  This is a pretty <em 
class="thing">awesome</em> thing to be talking about.', 'thing talking'), 
'Hello.  This is a pretty awesome <strong class="highlight">thing</strong> to 
be <strong class="highlight">talking</strong> about.', 'highlight_result_text() 
highlights text and strips out HTML');

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" 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.com/group/symfony-svn?hl=en.

Reply via email to