tddwizard / magento2-fixtures

Fixture library for Magento 2 integration tests by @schmengler (@integer-net)
http://tddwizard.com/
MIT License
141 stars 28 forks source link

Allow adding backorders to stock items #47

Closed lfolco closed 4 years ago

lfolco commented 4 years ago

This adds the ability to set the backorders flag in the ProductBuilder

schmengler commented 4 years ago

Thank you for your contribution, Laura! Unfortunately the tests don't pass yet:

PHPUnit 6.5.14 by Sebastian Bergmann and contributors.

.......F............................                              36 / 36 (100%)

Time: 2.22 minutes, Memory: 324.50MB

There was 1 failure:

1) TddWizard\Fixtures\Catalog\ProductBuilderTest::testSimpleProductWithSpecificAttributes
stock backorders
Failed asserting that 0 matches expected 2.

/var/www/magento/vendor/tddwizard/magento2-fixtures/tests/Catalog/ProductBuilderTest.php:115

FAILURES!
Tests: 36, Assertions: 132, Failures: 1.

It looks like we need more setup to get extension attributes to work. CI runs tests on 2.3.4 only at the moment though. Does it work for you in later Magento versions?

lfolco commented 4 years ago

It's working on 2.3.5, I haven't tried it on earlier versions.

schmengler commented 4 years ago

But the tests also fail on 2.3.5 (tried it here: https://app.wercker.com/schmengler/magento2-fixtures/runs/build/5f1eee95dac5630008b63571?step=5f1eeeeeaa6b94000849d59e)

Could you check that?

lfolco commented 4 years ago

Tests as passing!

schmengler commented 4 years ago

:partying_face: