[2.0.0-beta2] Kernel Source Tests

Created on 22 August 2024, 25 days ago
Updated 15 September 2024, 1 day ago

Kernel Tests for Source Plugins

Sample Test

Prepare a fixture.

sources:
  textfield:
    test-sets:
      - name: default
        component: ui_patterns_test:test-component
        prop_id: string
        contexts:
          - entity
        configuration:
          source_id: textfield
          source:
            value: 'test input'
        output:
          value: test input

Run a test extending SourcePluginsTestBase.

  /**
   * Test source plugins.
   */
  public function testSources(): void {
    $testData = self::loadTestDataFixture(__DIR__ . "/../fixtures/TestDataSet.yml", $this->getContexts());
    $this->runSourcePluginTest($testData->getTestSet('textfield', 'default'));
    $this->runSourcePluginTest($testData->getTestSet('textfield', 'slot'));
    $this->runSourcePluginTest($testData->getTestSet('token', 'default'));
    // Add new source plugin.
  }
📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇩🇪Germany Christian.wiedemann

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