File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 99 */
1010class IntegerNet_Solr_Model_Resource_Catalog_Product_Indexing_Collection extends Mage_Catalog_Model_Resource_Product_Collection
1111{
12+ public function isEnabledFlat ()
13+ {
14+ return false ;
15+ }
16+
1217 /**
1318 * Join Product Price Table
1419 * Join left by default in order to include products without price index entry
Original file line number Diff line number Diff line change 1414 * @loadFixture registry
1515 * @loadFixture config
1616 */
17- class IntegerNet_Solr_Test_Model_Indexer_Product extends EcomDev_PHPUnit_Test_Case_Controller
17+ class IntegerNet_Solr_Test_Model_Indexer_Product extends IntegerNet_Solr_Test_Controller_Abstract
1818{
1919 /**
2020 * @param array $config
@@ -41,6 +41,8 @@ public function invalidSwapConfigurationShouldThrowException(array $config)
4141 */
4242 public function saveProductShouldUpdateSolrIndex ()
4343 {
44+ $ this ->setUpFreshIndex ();
45+
4446 $ this ->setCurrentStore (0 );
4547 $ this ->adminSession ();
4648 $ productId = 21001 ;
@@ -72,4 +74,11 @@ public function searchFor($queryText)
7274 );
7375 return $ searchRequestFactory ->createRequest ()->doRequest ();
7476 }
77+
78+ private function setUpFreshIndex ()
79+ {
80+ Mage::getModel ('integernet_solr/indexer ' )->reindexAll ();
81+ $ indexProcess = Mage::getModel ('index/process ' )->load ('integernet_solr ' , 'indexer_code ' );
82+ $ indexProcess ->setMode (Mage_Index_Model_Process::MODE_REAL_TIME )->save ();
83+ }
7584}
You can’t perform that action at this time.
0 commit comments