public function testGetBaseConfig()
    {
        $this->context->expects($this->once())->method('getPath')->will($this->returnValue('area/theme/locale'));
        $this->context->expects($this->once())->method('getBaseUrl')->will($this->returnValue('http://base.url/'));
        $expected = <<<expected
require.config({"baseUrl":"http://base.url/area/theme/locale"});
expected;
        $actual = $this->object->getBaseConfig();
        $this->assertSame($expected, $actual);
    }
Esempio n. 2
0
 /**
  * Include base RequireJs configuration necessary for working with Magento application
  *
  * @return string|void
  */
 protected function _toHtml()
 {
     return "<script type=\"text/javascript\">\n" . $this->config->getBaseConfig() . "</script>\n";
 }