Skip to content

Commit 0689e70

Browse files
author
Yu Tang
committed
MAGETWO-28253: Downloadable Integration API
- Added rollback script for configurable integration test scripts
1 parent 347140f commit 0689e70

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
/**
3+
* Copyright © 2015 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
/** @var \Magento\Framework\Registry $registry */
8+
$registry = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\Registry');
9+
10+
$registry->unregister('isSecureArea');
11+
$registry->register('isSecureArea', true);
12+
13+
$eavConfig = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Eav\Model\Config');
14+
$attribute = $eavConfig->getAttribute('catalog_product', 'test_configurable');
15+
if ($attribute instanceof \Magento\Eav\Model\Entity\Attribute\AbstractAttribute
16+
&& $attribute->getId()
17+
) {
18+
$attribute->delete();
19+
}
20+
$eavConfig->clear();
21+
22+
$registry->unregister('isSecureArea');
23+
$registry->register('isSecureArea', false);
24+

dev/tests/integration/testsuite/Magento/ConfigurableProduct/_files/product_configurable_rollback.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,7 @@
2727
$product->delete();
2828
}
2929

30+
require __DIR__ . '/configurable_attribute_rollback.php';
31+
3032
$registry->unregister('isSecureArea');
3133
$registry->register('isSecureArea', false);

0 commit comments

Comments
 (0)