Inheritance: extends Dumplie\SharedKernel\Tests\Context\Context
示例#1
0
 function test_that_put_back_product_to_stock()
 {
     $this->inventoryContext->commandBus()->handle(new CreateProduct('dumplie-sku-1', 20050, 'EUR', true));
     $this->inventoryContext->commandBus()->handle(new RemoveProductFromStock('dumplie-sku-1'));
     $this->inventoryContext->commandBus()->handle(new PutBackProductToStock('dumplie-sku-1'));
     $this->clear();
     $product = $this->inventoryContext->products()->getBySku(new SKU('dumplie-sku-1'));
     $this->assertEquals(new Product(new SKU('dumplie-sku-1'), new Price(20050, 'EUR'), true), $product);
 }