コード例 #1
0
ファイル: DataTest.php プロジェクト: aiesh/magento2
 public function testGetAttributeHiddenFields()
 {
     $this->assertEquals(array(), $this->helper->getAttributeHiddenFields());
     /** @var $objectManager \Magento\TestFramework\ObjectManager */
     $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
     $objectManager->get('Magento\\Framework\\Registry')->register('attribute_type_hidden_fields', 'test');
     try {
         $this->assertEquals('test', $this->helper->getAttributeHiddenFields());
         $objectManager->get('Magento\\Framework\\Registry')->unregister('attribute_type_hidden_fields');
     } catch (\Exception $e) {
         $objectManager->get('Magento\\Framework\\Registry')->unregister('attribute_type_hidden_fields');
         throw $e;
     }
 }