?>
</h2>

<p><?php 
echo __('The following results matched your query:');
?>
</p>

<ol start="<?php 
echo $pager->getFirstIndice();
?>
" class="search-results">
  <?php 
foreach ($pager->getResults() as $result) {
    ?>
    <li><?php 
    include_search_result($result, $query);
    ?>
</li>
  <?php 
}
?>
</ol>

<?php 
include_search_pager($pager, sfConfig::get('app_lucene_pager_radius'), $category);
?>

<?php 
include_search_controls($query);
<?php

/**
 * @package sfLucenePlugin
 * @subpackage Module
 * @author Carl Vondrick <*****@*****.**>
 * @version SVN: $Id: searchControls.php 7108 2008-01-20 07:44:42Z Carl.Vondrick $
 */
?>

<?php 
use_helper('sfLucene', 'I18N');
?>

<h2><?php 
echo __('Search');
?>
</h2>
<p><?php 
echo __('Use our search engine to pinpoint exactly what you need on our site.');
?>
</p>

<?php 
include_search_controls($form);
    {
        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');
$t->is(highlight_result_text('Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. This is a pretty <em class="thing">awesome</em> thing to be talking about.  Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. ', 'thing talking', 50), '...is is a pretty awesome <strong class="highlight">thing</strong> to be <strong class="highlight">talking</strong> about....', 'highlight_result_text() highlights and truncates text');
$t->is(highlight_keywords('Hello.  This is a pretty <em class="thing">awesome</em> thing to be talking about.', 'thing talking'), 'Hello.  This is a pretty <em class="thing">awesome</em> <strong class="highlight">thing</strong> to be <strong class="highlight">talking</strong> about.', 'highlight_kewyords() highlights text');
$t->diag('testing query string manipulation');
$t->is(add_highlight_qs('test/model', 'foo bar'), 'test/model?sf_highlight=foo bar', 'add_highlight_qs() adds a query string correctly');