Loading core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceFormatterTest.php +4 −4 Changes for core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceFormatterTest.php: 4 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -267,7 +267,7 @@ public function testEntityFormatterRecursiveRendering() { // the entity title because we're rendering the full entity, not just the // reference field. $expected_occurrences = EntityReferenceEntityFormatter::RECURSIVE_RENDER_LIMIT * 2 + 2; $actual_occurrences = substr_count($output, $referencing_entity_1->name->value); $actual_occurrences = substr_count($output, $referencing_entity_1->label()); $this->assertEquals($expected_occurrences, $actual_occurrences); // Repeat the process with another entity in order to check that the Loading @@ -280,17 +280,17 @@ public function testEntityFormatterRecursiveRendering() { $build = $view_builder->view($referencing_entity_2, 'default'); $output = $renderer->renderRoot($build); $actual_occurrences = substr_count($output, $referencing_entity_2->name->value); $actual_occurrences = substr_count($output, $referencing_entity_2->label()); $this->assertEquals($expected_occurrences, $actual_occurrences); // Now render both entities at the same time and check again. $build = $view_builder->viewMultiple([$referencing_entity_1, $referencing_entity_2], 'default'); $output = $renderer->renderRoot($build); $actual_occurrences = substr_count($output, $referencing_entity_1->name->value); $actual_occurrences = substr_count($output, $referencing_entity_1->label()); $this->assertEquals($expected_occurrences, $actual_occurrences); $actual_occurrences = substr_count($output, $referencing_entity_2->name->value); $actual_occurrences = substr_count($output, $referencing_entity_2->label()); $this->assertEquals($expected_occurrences, $actual_occurrences); } Loading Loading
core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceFormatterTest.php +4 −4 Changes for core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceFormatterTest.php: 4 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -267,7 +267,7 @@ public function testEntityFormatterRecursiveRendering() { // the entity title because we're rendering the full entity, not just the // reference field. $expected_occurrences = EntityReferenceEntityFormatter::RECURSIVE_RENDER_LIMIT * 2 + 2; $actual_occurrences = substr_count($output, $referencing_entity_1->name->value); $actual_occurrences = substr_count($output, $referencing_entity_1->label()); $this->assertEquals($expected_occurrences, $actual_occurrences); // Repeat the process with another entity in order to check that the Loading @@ -280,17 +280,17 @@ public function testEntityFormatterRecursiveRendering() { $build = $view_builder->view($referencing_entity_2, 'default'); $output = $renderer->renderRoot($build); $actual_occurrences = substr_count($output, $referencing_entity_2->name->value); $actual_occurrences = substr_count($output, $referencing_entity_2->label()); $this->assertEquals($expected_occurrences, $actual_occurrences); // Now render both entities at the same time and check again. $build = $view_builder->viewMultiple([$referencing_entity_1, $referencing_entity_2], 'default'); $output = $renderer->renderRoot($build); $actual_occurrences = substr_count($output, $referencing_entity_1->name->value); $actual_occurrences = substr_count($output, $referencing_entity_1->label()); $this->assertEquals($expected_occurrences, $actual_occurrences); $actual_occurrences = substr_count($output, $referencing_entity_2->name->value); $actual_occurrences = substr_count($output, $referencing_entity_2->label()); $this->assertEquals($expected_occurrences, $actual_occurrences); } Loading