/**
* @internal
*/
class BasicOrderProductTest extends TestCase
{ use IntegrationTestBehaviour;
use TestShortHands;
public function testBasicOrderFlow(): void
{ $product =
(new ProductBuilder(new IdsCollection(), 'p1'
)) ->
stock(100
) ->
price(100
) ->
visibility();
// the product builder has a helper function to write the product values to the database, including all dependencies (rules, currencies, properties, etc)
$product->
write($this->
getContainer());
$context =
$this->
getContext();
$context =
$this->
login($context);
// now we test that the product can be added to a customers cart
$cart =
$this->
addProductToCart($product->id,
$context);