CommerceFeedsKernelTestBase.php in Commerce Feeds 8
File
tests/src/Kernel/CommerceFeedsKernelTestBase.php
View source
<?php
namespace Drupal\Tests\commerce_feeds\Kernel;
use Drupal\Tests\commerce\Kernel\CommerceKernelTestBase;
use Drupal\Tests\feeds\Traits\FeedCreationTrait;
use Drupal\Tests\feeds\Traits\FeedsCommonTrait;
abstract class CommerceFeedsKernelTestBase extends CommerceKernelTestBase {
use FeedCreationTrait;
use FeedsCommonTrait;
public static $modules = [
'path',
'feeds',
'commerce_feeds',
'commerce_product',
];
protected $user;
protected function setUp() {
parent::setUp();
$this
->installEntitySchema('feeds_feed');
$this
->installEntitySchema('feeds_subscription');
$this
->installEntitySchema('commerce_product_variation');
$this
->installEntitySchema('commerce_product');
$this
->installSchema('feeds', 'feeds_clean_list');
$this
->installConfig([
'commerce_product',
]);
$user = $this
->createUser();
$this->user = $this
->reloadEntity($user);
$this->container
->get('current_user')
->setAccount($user);
}
protected function absolutePath() {
return $this
->absolute() . '/' . drupal_get_path('module', 'commerce_feeds');
}
}