/** * @magentoAdminConfigFixture any_config some_value */ public function testInitStoreAfter() { $this->_object->startTest($this); $this->_object->expects($this->at(0))->method('_getConfigValue')->with('any_config')->will($this->returnValue('some_value')); $this->_object->expects($this->at(1))->method('_setConfigValue')->with('any_config', 'some_value'); $this->_object->initStoreAfter(); }
/** * @magentoConfigFixture current_store web/unsecure/base_url http://example.com/ */ public function testInitStoreAfter() { $this->_object->startTest($this); $this->_object->expects($this->at(0))->method('_getConfigValue')->with('web/unsecure/base_url')->will($this->returnValue('http://localhost/')); $this->_object->expects($this->at(1))->method('_setConfigValue')->with('web/unsecure/base_url', 'http://example.com/'); $this->_object->initStoreAfter(); }
/** * @magentoConfigFixture admin_store dev/restrict/allow_ips 192.168.0.2 */ public function testSpecificStoreConfig() { $this->_annotation->expects($this->at(0))->method('_getConfigValue')->with('dev/restrict/allow_ips', 'admin')->will($this->returnValue('192.168.0.1')); $this->_annotation->expects($this->at(1))->method('_setConfigValue')->with('dev/restrict/allow_ips', '192.168.0.2', 'admin'); $this->_annotation->startTest(); $this->_annotation->expects($this->once())->method('_setConfigValue')->with('dev/restrict/allow_ips', '192.168.0.1', 'admin'); $this->_annotation->endTest(); }
public function testEndTestSuiteRollbackTransaction() { $this->_imitateTransactionStartRequest('startTestTransactionRequest'); $this->_object->startTest($this); $this->_expectTransactionRollback($this->once()); $this->_object->endTestSuite(); }
/** * @magentoDataFixture path/to/fixture/script.php * @magentoDataFixture ../framework/tests/unit/testsuite/Magento/Test/Listener/_files/sample_fixture_two.php * @covers Magento_Test_Listener_Annotation_Fixture::_revertFixture */ public function testRevertFixtureFile() { $this->_annotation->startTest(); $this->_annotation->expects($this->at(1))->method('_applyOneFixture')->with($this->stringEndsWith('Magento/Test/Listener/_files/sample_fixture_two_rollback.php')); $this->_annotation->endTest(); }