protected function EntityLoadHelperTest::setUpCategorizeAttributesTests in YAML Content 8
Prepare the EntityLoadHelper mock for testing categorizeAttributes.
4 calls to EntityLoadHelperTest::setUpCategorizeAttributesTests()
- EntityLoadHelperTest::testCategorizeAttributesAlwaysReturnsThreeKeys in tests/
src/ Unit/ EntityLoadHelper/ EntityLoadHelperTest.php - Test categorizeAttributes always returns three attribute categories.
- EntityLoadHelperTest::testCategorizeAttributesProperlyIdentifiesFields in tests/
src/ Unit/ EntityLoadHelper/ EntityLoadHelperTest.php - Test categorizeAttributes identifies fields as expected.
- EntityLoadHelperTest::testCategorizeAttributesProperlyIdentifiesOther in tests/
src/ Unit/ EntityLoadHelper/ EntityLoadHelperTest.php - Test categorizeAttributes identifies "other" attributes as expected.
- EntityLoadHelperTest::testCategorizeAttributesProperlyIdentifiesProperties in tests/
src/ Unit/ EntityLoadHelper/ EntityLoadHelperTest.php - Test categorizeAttributes identifies properties as expected.
File
- tests/
src/ Unit/ EntityLoadHelper/ EntityLoadHelperTest.php, line 614
Class
- EntityLoadHelperTest
- Test functionality of the EntityLoadHelper class.
Namespace
Drupal\Tests\yaml_content\Unit\EntityLoadHelperCode
protected function setUpCategorizeAttributesTests() {
$this->loadHelper = $this
->getEntityLoadHelperMock([
'getEntityFields',
'getEntityDefinition',
]);
// Mock the getEntityFields return value.
$this->loadHelper
->method('getEntityFields')
->willReturnCallback([
$this,
'getEntityFields',
]);
// Mock the getEntityDefinition return value.
$this->loadHelper
->method('getEntityDefinition')
->willReturnCallback([
$this,
'getEntityDefinition',
]);
}