Resolve #3447937 "Test entityref"
2 unresolved threads
Closes #3447937
Merge request reports
Activity
48 parent::setUp(); 49 $this->installEntitySchema('user'); 50 } 51 52 /** 53 * Compares markup strings. 54 * 55 * @param string $expected_markup 56 * Expected string. 57 * @param string $tested_markup 58 * String to be tested. 59 */ 60 protected function assertMarkupEquals($expected_markup, $tested_markup) { 61 // @see https://www.drupal.org/node/3334057 62 $this->assertSame($this->trim($expected_markup), $this->trim($tested_markup)); 63 } I'm creating a lot of redundancy (over tests) with all these duplicate small helper functions, but I don't want to think about why PHPUnit breaks when 1) a test fails 2) I refactor this to be called from inside another protected function.
So I'm not going to do refactoring or putting it into a trait right now.
(Current thought: maybe it's something to do with implicit conversion from markup to string... somewhere. Will look at it sometime when I have time.)
167 'name' => 'ref-user', 168 'is_slot' => $is_slot, 169 'formatter' => 'entity_ce_render', 170 'configuration' => $config + ['mode' => 'full'], 171 ]) 172 ->save(); 173 } 174 175 /** 176 * Tests output for an entityreference field with cardinality 1. 177 */ 178 public function testSingleCardinality() { 179 $referrer = $this->setupUser(); 180 181 // Slot. 182 // @todo fix 'drupal-' prefix mentioned in merge request !65 (merged)
added 1 commit
- d93cdc8d - Update EntityReferenceCeFieldFormatterTest.php
Please register or sign in to reply