Skip to content

Commit fe4b27b

Browse files
committed
MC-40078: Create automated test for: "Create attribute without attribute code"
1 parent ae96ab2 commit fe4b27b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Attribute/RepositoryTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
use Magento\Catalog\Api\Data\ProductAttributeInterface;
1111
use Magento\Catalog\Api\Data\ProductAttributeInterfaceFactory;
12+
use Magento\Catalog\Api\ProductAttributeRepositoryInterface;
1213
use Magento\Catalog\Setup\CategorySetup;
1314
use Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface;
1415
use Magento\Framework\Exception\InputException;
@@ -28,7 +29,7 @@ class RepositoryTest extends TestCase
2829
/** @var ObjectManagerInterface */
2930
private $objectManager;
3031

31-
/** @var Repository */
32+
/** @var ProductAttributeRepositoryInterface */
3233
private $repository;
3334

3435
/** @var ProductAttributeInterfaceFactory */
@@ -45,7 +46,7 @@ protected function setUp(): void
4546
parent::setUp();
4647

4748
$this->objectManager = Bootstrap::getObjectManager();
48-
$this->repository = $this->objectManager->get(Repository::class);
49+
$this->repository = $this->objectManager->get(ProductAttributeRepositoryInterface::class);
4950
$this->attributeFactory = $this->objectManager->get(ProductAttributeInterfaceFactory::class);
5051
}
5152

@@ -97,7 +98,7 @@ public function testSaveWithInvalidCode(string $fieldName, string $fieldValue):
9798
/**
9899
* @return array
99100
*/
100-
public function errorProvider():array
101+
public function errorProvider(): array
101102
{
102103
return [
103104
'with_invalid_attribute_code' => [

0 commit comments

Comments
 (0)