Skip to content

Commit a637cfb

Browse files
author
Joan He
committed
MAGETWO-59759: Remove usage of AttributeCache from \Magento\Eav\Model\ResourceModel\ReadHandler
- address code review comment
1 parent 9130077 commit a637cfb

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

app/code/Magento/Eav/Test/Unit/Model/ResourceModel/ReadHandlerTest.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,6 @@ public function testExecute($eavEntityType, $callNum, array $expected, $isStatic
112112
$this->configMock->expects($this->exactly($callNum))
113113
->method('getAttributes')
114114
->willReturn([$attributeMock]);
115-
$getAttributesMethod = new \ReflectionMethod(
116-
\Magento\Eav\Model\ResourceModel\ReadHandler::class,
117-
'getAttributes'
118-
);
119-
$getAttributesMethod->setAccessible(true);
120115
$this->assertEquals($expected, $this->readHandler->execute('entity_type', $entityData));
121116
}
122117

@@ -147,11 +142,6 @@ public function testExecuteWithException()
147142
->willThrowException(new \Exception('Unknown entity type'));
148143
$this->configMock->expects($this->never())
149144
->method('getAttributes');
150-
$getAttributesMethod = new \ReflectionMethod(
151-
\Magento\Eav\Model\ResourceModel\ReadHandler::class,
152-
'getAttributes'
153-
);
154-
$getAttributesMethod->setAccessible(true);
155-
$getAttributesMethod->invoke($this->readHandler, 'entity_type');
145+
$this->readHandler->execute('entity_type', ['linkField' => 'theLinkField']);
156146
}
157147
}

0 commit comments

Comments
 (0)