Right now every submodule creates its own test base class and duplicates createEntity() and assertFieldValues().

So let's create a CommerceTestBase that places blocks, contains those two methods.

Comments

bojanz created an issue. See original summary.

vasike’s picture

Status: Active » Needs review
StatusFileSize
new14.95 KB

there is patch for this:
- Implement CommerceTestBase
- Update OrderTestBase.php / ProductTestBase.php / StoreTestBase.php & EntitySelectWidgetTest.php to use this new test base class.

mglaman’s picture

Here's an updated patch that provides permissions and adminUser helper.

mglaman’s picture

Status: Needs review » Needs work

This no longer applies.

mglaman’s picture

Status: Needs work » Needs review
StatusFileSize
new14.49 KB
mglaman’s picture

Status: Needs review » Needs work

PR failing.

vasike’s picture

Status: Needs work » Needs review
StatusFileSize
new16.53 KB

Here is a reroll of the previous patch/PR
+ Some "cleanup" for StoreTestBase and EntitySelectWidgetTest on using CommerceTestBase.

mglaman’s picture

vasike’s picture

There are new Tests for Currency - #2615398: Create tests for currencies, let's include them in the patch.

  • bojanz committed e874c12 on 8.x-2.x authored by vasike
    Issue #2617638 by vasike, mglaman: Create a CommerceTestBase
    
bojanz’s picture

Status: Needs review » Fixed

Committed, thanks!

vasike’s picture

Status: Fixed » Needs review
StatusFileSize
new1.38 KB

patch with some cleanup for previous commit

bojanz’s picture

Status: Needs review » Fixed

Committed.

  • bojanz committed 99055d9 on 8.x-2.x authored by vasike
    Issue #2617638 followup by vasike: Clean up CommerceTestBase
    

Status: Fixed » Closed (fixed)

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