Overview

I realized in #3468269: `ComponentTreeStructure` data type: simplify the stored structure that this issue might be hard to review because we have test code like this

 'props invalid, using dynamic props' => [
        [
          'tree' => '{"' . ComponentTreeStructure::ROOT_UUID . '": [{"uuid":"dynamic-static-card2df","component":"xb_test_sdc:props-slots"}, {"uuid":"dynamic-static-card3","component":"xb_test_sdc:props-slots"},{"uuid":"dynamic-static-card4","component":"xb_test_sdc:props-slots"}]}',
          'props' => '{"dynamic-static-card2df":{"heading-2":{"sourceType":"dynamic","expression":"ℹ︎␜entity:node:article␝title␞␟value"}},"dynamic-static-card3":{"heading-1":{"sourceType":"dynamic","expression":"ℹ︎␜entity:node:article␝title␞␟value"}},"dynamic-static-card4":{"heading":{"sourceType":"dynamic","expression":"ℹ︎␜entity:node:article␝title␞␟value"}}}',
        ],
      ],

(ComponentTreeTestTrait)

Because props and tree are json strings seeing the structure changes would be hard to grok

Proposed resolution

change these test cases to use php arrays, passed through json_encode() where possible

User interface changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

tedbow created an issue. See original summary.

tedbow’s picture

Assigned: Unassigned » wim leers
Status: Active » Needs review
wim leers’s picture

Title: Convert test cases to use php arrays instead of json strings where possible » Convert test cases to use PHP arrays instead of JSON strings where possible
Assigned: wim leers » Unassigned
Status: Needs review » Reviewed & tested by the community
Issue tags: +blocker, +DX (Developer Experience)
wim leers’s picture

Status: Reviewed & tested by the community » Fixed

  • Wim Leers committed af1274ee on 0.x authored by tedbow
    Issue #3469253 by tedbow: Convert test cases to use PHP arrays instead...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.