File tree Expand file tree Collapse file tree 1 file changed +8
-16
lines changed
dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Attribute/Backend Expand file tree Collapse file tree 1 file changed +8
-16
lines changed Original file line number Diff line number Diff line change @@ -38,13 +38,18 @@ public function testGenerateUniqueSkuNotExistingProduct($product)
38
38
}
39
39
40
40
/**
41
- * @param $product \Magento\Catalog\Model\Product
42
- * @dataProvider uniqueLongSkuDataProvider
41
+ * @magentoDataFixture Magento/Catalog/_files/product_simple.php
43
42
* @magentoAppArea adminhtml
44
43
* @magentoDbIsolation enabled
45
44
*/
46
- public function testGenerateUniqueLongSku ($ product )
45
+ public function testGenerateUniqueLongSku ()
47
46
{
47
+ $ repository = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ()->create (
48
+ 'Magento\Catalog\Model\ProductRepository '
49
+ );
50
+ $ product = $ repository ->get ('simple ' );
51
+ $ product ->setSku ('0123456789012345678901234567890123456789012345678901234567890123 ' );
52
+
48
53
/** @var \Magento\Catalog\Model\Product\Copier $copier */
49
54
$ copier = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ()->get (
50
55
'Magento\Catalog\Model\Product\Copier '
@@ -66,19 +71,6 @@ public function uniqueSkuDataProvider()
66
71
return [[$ product ]];
67
72
}
68
73
69
- /**
70
- * Returns simple product
71
- *
72
- * @return array
73
- */
74
- public function uniqueLongSkuDataProvider ()
75
- {
76
- $ product = $ this ->_getProduct ();
77
- $ product ->setSku ('0123456789012345678901234567890123456789012345678901234567890123 ' );
78
- //strlen === 64
79
- return [[$ product ]];
80
- }
81
-
82
74
/**
83
75
* Get product form data provider
84
76
*
You can’t perform that action at this time.
0 commit comments