Example #1
0
 public function testGetJsonConfig()
 {
     $config = (array) json_decode($this->_block->getJsonConfig());
     $this->assertNotEmpty($config);
     $this->assertArrayHasKey('productId', $config);
     $this->assertEquals(1, $config['productId']);
 }
 /**
  * {@inheritdoc}
  */
 public function getJsonConfig()
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getJsonConfig');
     if (!$pluginInfo) {
         return parent::getJsonConfig();
     } else {
         return $this->___callPlugins('getJsonConfig', func_get_args(), $pluginInfo);
     }
 }