Example #1
0
 public function testGetTransport()
 {
     Mage::registerStoreConfigMock('xfabric/connection_settings/adapter', 'xcom_xfabric/transport_xfabric');
     $authModel = $this->mockModel('xcom_xfabric/authorization', array('getFabricUrl'));
     $authModel->expects($this->once())->method('getFabricUrl')->will($this->returnValue('test_host'));
     $helper = $this->mockHelper('xcom_xfabric', array('getAuthModel'));
     $helper->expects($this->any())->method('getAuthModel')->will($this->returnValue($authModel));
     $helperTransport = Mage::helper('xcom_xfabric')->getTransport();
     $this->assertEquals($helperTransport->getUrl(), 'test_host', "Transport Host is wrong");
 }
Example #2
0
 /**
  * Mock store config
  *
  * @param string $node
  * @param string|int|bool $value
  * @return void
  */
 public function mockStoreConfig($node, $value)
 {
     Mage::registerStoreConfigMock($node, $value);
 }