/*
 * This file is part of the sfLucenePlugin package
 * (c) 2007 - 2008 Carl Vondrick <*****@*****.**>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
/**
 * @package sfLucenePlugin
 * @subpackage Test
 * @author Carl Vondrick
 * @version SVN: $Id: sfLuceneFormTest.php 7108 2008-01-20 07:44:42Z Carl.Vondrick $
 */
require dirname(__FILE__) . '/../../bootstrap/unit.php';
$t = new limeade_test(9, limeade_output::get());
$limeade = new limeade_sf($t);
$app = $limeade->bootstrap();
class DummyForm extends sfLuceneForm
{
    public $setupCount = 0, $configureCount = 0;
    public function configure()
    {
        $this->configureCount++;
    }
    public function setup()
    {
        $this->setupCount++;
    }
}
$t->diag('testing constructor');
try {
/*
 * This file is part of the sfLucenePlugin package
 * (c) 2007 - 2008 Carl Vondrick <*****@*****.**>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
/**
 * @package sfLucenePlugin
 * @subpackage Test
 * @author Carl Vondrick
 * @version SVN: $Id: sfLuceneToolkitTest.php 7108 2008-01-20 07:44:42Z Carl.Vondrick $
 */
require dirname(__FILE__) . '/../../bootstrap/unit.php';
$t = new limeade_test(14, limeade_output::get());
$limeade = new limeade_sf($t);
$app = $limeade->bootstrap();
$luceneade = new limeade_lucene($limeade);
$luceneade->configure()->clear_sandbox();
$t->diag('testing ::loadZend()');
sfConfig::set('app_lucene_zend_location', '/tmp');
try {
    $e = $t->exception('::loadZend() fails with non-existant Zend path');
    sfLuceneToolkit::loadZend();
    $e->no();
} catch (Exception $ex) {
    $e->caught($ex);
}
$limeade->config()->remove('app_lucene_zend_location');
$t->not_like_included('#/Zend/Search/Lucene/#', 'Zend Search Lucene is not loaded after failed run');
$t->not_in_include_path('Zend/Search/Lucene.php', 'Zend Search Lucene is not in the include path after failed run');