File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -22,5 +22,7 @@ public function disconnectMysql()
2222 $ connection ->closeConnection ();
2323 }
2424 }
25+ // connections (adapter objects) must be fully reinitialized, otherwise initStatements are not executed
26+ Mage::unregister ('_singleton/core/resource ' );
2527 }
2628}
Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * integer_net Magento Module
4+ *
5+ * @category IntegerNet
6+ * @package IntegerNet_Solr
7+ * @copyright Copyright (c) 2016 integer_net GmbH (http://www.integer-net.de/)
8+ * @author Fabian Schmengler <fs@integer-net.de>
9+ */
10+
11+ /**
12+ * @loadFixture registry
13+ * @doNotIndexAll
14+ */
15+ class IntegerNet_Solr_Test_Model_Resource_Db extends EcomDev_PHPUnit_Test_Case
16+ {
17+ public function testDisconnectUnsetsConnection ()
18+ {
19+ Mage::getResourceModel ('integernet_solr/db ' )->disconnectMysql ();
20+ $ this ->assertEquals (
21+ [],
22+ Mage::getSingleton ('core/resource ' )->getConnections ()
23+ );
24+ }
25+ }
You can’t perform that action at this time.
0 commit comments