ProductBundleStockKernelTestBase.php in Commerce Product Bundle 8
File
modules/commerce_product_bundle_stock/tests/src/Kernel/ProductBundleStockKernelTestBase.php
View source
<?php
namespace Drupal\Tests\commerce_product_bundle_stock\Kernel;
use Drupal\Tests\commerce_product_bundle\Kernel\CommerceProductBundleKernelTestBase;
abstract class ProductBundleStockKernelTestBase extends CommerceProductBundleKernelTestBase {
protected $locationStub;
public static $modules = [
'commerce_stock',
'commerce_stock_local',
'commerce_stock_field',
'commerce_product_bundle_stock',
];
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();
}
}