-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Open
Labels
Area: CatalogComponent: CatalogIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.A defect with this priority could have functionality issues which are not to expectations.Progress: ready for devReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branchSeverity: S2Major restrictions or short-term circumventions are required until a fix is available.Major restrictions or short-term circumventions are required until a fix is available.Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject itIssue related to Developer Experience and needs help with Triage to Confirm or Reject itbug report
Milestone
Description
Preconditions
- Magento 2.1.0 ans seems still actual for
2.4-develop
Steps to reproduce
- Write an integration test case as follows:
public function testCategoryAttributeExists($attributeCode)
{
$categoryAttributesRepository = \Magento\TestFramework\ObjectManager::getInstance()->get(
\Magento\Catalog\Api\CategoryAttributeRepositoryInterface::class
);
$this->assertInstanceOf(
\Magento\Catalog\Api\Data\CategoryAttributeInterface::class,
$categoryAttributesRepository->get($attributeCode)
);
}
- Pass an existing attribute code via data provider
- Run the test
Expected result
- The test passes, because the contract of
Magento\Catalog\Api\CategoryAttributeRepositoryInterface
states:
/**
* Retrieve specific attribute
*
* @param string $attributeCode
* @return \Magento\Catalog\Api\Data\CategoryAttributeInterface
*/
public function get($attributeCode);
Actual result
- The test fails with a message like this
Failed asserting that Magento\Catalog\Model\ResourceModel\Eav\Attribute\Interceptor Object (...) is an instance of interface "Magento\Catalog\Api\Data\CategoryAttributeInterface".
Metadata
Metadata
Assignees
Labels
Area: CatalogComponent: CatalogIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.A defect with this priority could have functionality issues which are not to expectations.Progress: ready for devReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branchSeverity: S2Major restrictions or short-term circumventions are required until a fix is available.Major restrictions or short-term circumventions are required until a fix is available.Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject itIssue related to Developer Experience and needs help with Triage to Confirm or Reject itbug report