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

Class 'Magento\TestFramework\Helper\Bootstrap' - Magento 2.2 #3

Closed amenk closed 6 years ago

amenk commented 6 years ago

I have a unit test with the following code:

    $cart = CartBuilder::forCurrentSession()
        ->withSimpleProduct("proof")
        ->build();

And get

Class 'Magento\TestFramework\Helper\Bootstrap' not found
     vendor/tddwizard/magento2-fixtures/src/Checkout/CartBuilder.php:39

I am using Magento 2.2

maybe I use the library wrong?

Or it's a Magento 2.2 problem?

The code seems to have moved?

https://github.com/magento/magento2/tree/2.2-develop/lib/internal/Magento/Framework/TestFramework

amenk commented 6 years ago

https://magento.stackexchange.com/questions/120968/objectmanager-is-unusable-for-me-in-magento-2-unit-tests

amenk commented 6 years ago

The questions I am asking myself: Can I run this in unit tests or only during integration tests?

amenk commented 6 years ago

YES :-) RTFM ...

But still I think the library reference is wrong?