protected function ProductBundleStockKernelTestBase::setUp in Commerce Product Bundle 8
@requires module commerce_stock
Overrides CommerceProductBundleKernelTestBase::setUp
File
- modules/
commerce_product_bundle_stock/ tests/ src/ Kernel/ ProductBundleStockKernelTestBase.php, line 39
Class
- ProductBundleStockKernelTestBase
- Provides a base class for Commerce Product Bundle Stock tests.
Namespace
Drupal\Tests\commerce_product_bundle_stock\KernelCode
protected function setUp() {
parent::setUp();
$this
->installEntitySchema('commerce_stock_location_type');
$this
->installEntitySchema('commerce_stock_location');
$this
->installConfig([
'commerce_stock',
]);
$this
->installConfig([
'commerce_stock_local',
]);
$this
->installConfig([
'commerce_product_bundle_stock',
]);
$user = $this
->createUser();
$this->user = $this
->reloadEntity($user);
$location = $this
->prophesize('Drupal\\commerce_stock_local\\Entity\\StockLocation');
$location
->getId()
->willReturn(1);
$location
->getName()
->willReturn('TestLocation');
$location
->isActive()
->willReturn(TRUE);
$this->locationStub = $location
->reveal();
}