Convert test cases to use PHP arrays instead of JSON strings where possible

Created on 20 August 2024, 3 months ago
Updated 4 September 2024, 2 months ago

Overview

I realized in 📌 `ComponentTreeStructure` date type: simplify the stored structure Active 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

📌 Task
Status

Fixed

Component

Page builder

Created by

🇺🇸United States tedbow Ithaca, NY, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024