Exemplo n.º 1
0
 public function testGetElementProperty()
 {
     $elementName = 'name';
     $elementAttr = 'attribute';
     $result = 'result';
     $this->structureMock->expects($this->once())->method('getAttribute')->with($this->equalTo($elementName), $this->equalTo($elementAttr))->will($this->returnValue($result));
     $this->assertSame($result, $this->model->getElementProperty($elementName, $elementAttr));
 }
Exemplo n.º 2
0
 /**
  * @magentoAppIsolation enabled
  * @dataProvider addContainerDataProvider()
  */
 public function testAddContainer($htmlTag)
 {
     $this->assertFalse($this->_layout->hasElement('container'));
     $this->_layout->addContainer('container', 'Container', ['htmlTag' => $htmlTag]);
     $this->assertTrue($this->_layout->hasElement('container'));
     $this->assertTrue($this->_layout->isContainer('container'));
     $this->assertEquals($htmlTag, $this->_layout->getElementProperty('container', 'htmlTag'));
     $this->_layout->addContainer('container1', 'Container 1', [], 'container', 'c1');
     $this->assertEquals('container1', $this->_layout->getChildName('container', 'c1'));
 }
Exemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function getElementProperty($name, $attribute)
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getElementProperty');
     if (!$pluginInfo) {
         return parent::getElementProperty($name, $attribute);
     } else {
         return $this->___callPlugins('getElementProperty', func_get_args(), $pluginInfo);
     }
 }