|
|
@@ -517,6 +517,25 @@ class Zend_Search_Lucene_LuceneTest extends PHPUnit_Framework_TestCase
|
|
|
|
|
|
$this->_clearDirectory(dirname(__FILE__) . '/_index/_files');
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @group ZF-9680
|
|
|
+ */
|
|
|
+ public function testIsDeletedWithoutExplicitCommit()
|
|
|
+ {
|
|
|
+ //$this->_clearDirectory(dirname(__FILE__) . '/_index/_files');
|
|
|
+
|
|
|
+ $index = Zend_Search_Lucene::create(dirname(__FILE__) . '/_index/_files');
|
|
|
+
|
|
|
+ $document = new Zend_Search_Lucene_Document;
|
|
|
+ $document->addField(Zend_Search_Lucene_Field::Keyword('_id', 'myId'));
|
|
|
+ $document->addField(Zend_Search_Lucene_Field::Keyword('bla', 'blubb'));
|
|
|
+ $index->addDocument($document);
|
|
|
+
|
|
|
+ $this->assertFalse($index->isDeleted(0));
|
|
|
+
|
|
|
+ $this->_clearDirectory(dirname(__FILE__) . '/_index/_files');
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if (PHPUnit_MAIN_METHOD == 'Zend_Search_Lucene_LuceneTest::main') {
|