Problem/Motivation

Add test for the field source plugin.

Proposed resolution

Write the tests.

Remaining tasks

Patch
review
commit

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quietone created an issue. See original summary.

quietone’s picture

FileSize
10.34 KB
quietone’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: 2966204-2.patch, failed testing. View results

quietone’s picture

Status: Needs work » Needs review
FileSize
906 bytes
10.41 KB

Wasn't working from HEAD.

Status: Needs review » Needs work

The last submitted patch, 5: 2966204-4.patch, failed testing. View results

quietone’s picture

Status: Needs work » Needs review
quietone’s picture

FileSize
10.34 KB
630 bytes

Removed setting of expected_count, that was wrong. The plugin really does return 2 rows, I just don't know why the test thinks it returns 1.

Status: Needs review » Needs work

The last submitted patch, 8: 2966204-7.patch, failed testing. View results

quietone’s picture

Status: Needs work » Needs review
FileSize
10.41 KB
6.26 KB

Finally got around to fixing this. The initializeIterator isn't called in the test and that method will add rows which then causes the test to get an incorrect count.

quietone’s picture

Status: Needs review » Reviewed & tested by the community

Let's get this test and then make a new release before the end of the day.

quietone’s picture

  1. +++ b/modules/commerce/tests/src/Kernel/Plugin/migrate/source/commerce1/FieldTest.php
    @@ -0,0 +1,166 @@
    + * Tests the Commerce 1 order item type source plugin.
    

    Field not order item type

  2. +++ b/modules/commerce/tests/src/Kernel/Plugin/migrate/source/commerce1/FieldTest.php
    @@ -0,0 +1,166 @@
    +    // Set to expected count to 1 because custom Field::InitializeIterator()
    +    // in not executed in the test.
    

    It is not executed during the count operation

Fixed on commit

  • quietone committed 41b39ea on 8.x-2.x
    Issue #2966204 by quietone: Add field source plugin test
    
quietone’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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