Skip to content
Snippets Groups Projects

Resolve #3447937 "Test entityref"

2 unresolved threads

Closes #3447937

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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 }
  • Author Developer

    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.)

  • Please register or sign in to reply
  • 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
    • Author Developer

      We should probably suppress adding the TagPrefix when a config object is loaded. Or something. But we should make it possible to use the actually configured prefix as-is, somehow.

      No idea yet about exact fix, will create d.o ticket, will look at it after Thunder issue is done.

    • Please register or sign in to reply
  • Roderik Muit mentioned in merge request !65 (merged)

    mentioned in merge request !65 (merged)

  • added 1 commit

    • d93cdc8d - Update EntityReferenceCeFieldFormatterTest.php

    Compare with previous version

  • Please register or sign in to reply
    Loading