|
12 | 12 | use DateTimeImmutable;
|
13 | 13 | use Lcobucci\JWT\UnencryptedToken;
|
14 | 14 | use OxidEsales\EshopCommunity\Internal\Container\ContainerFactory;
|
15 |
| -use OxidEsales\EshopCommunity\Internal\Framework\Database\QueryBuilderFactoryInterface; |
| 15 | +use OxidEsales\EshopCommunity\Core\Di\ContainerFacade; |
| 16 | +use OxidEsales\EshopCommunity\Internal\Framework\Database\ConnectionFactoryInterface; |
16 | 17 | use OxidEsales\EshopCommunity\Tests\Integration\IntegrationTestCase;
|
17 | 18 | use OxidEsales\EshopCommunity\Tests\TestContainerFactory;
|
18 |
| -use OxidEsales\Facts\Facts; |
19 | 19 | use OxidEsales\GraphQL\Base\DataType\UserInterface;
|
20 | 20 | use OxidEsales\GraphQL\Base\Framework\GraphQLQueryHandler;
|
21 | 21 | use OxidEsales\GraphQL\Base\Framework\RequestReader;
|
@@ -46,23 +46,20 @@ public function setUp(): void
|
46 | 46 | {
|
47 | 47 | parent::setUp();
|
48 | 48 |
|
49 |
| - $connection = ContainerFactory::getInstance() |
50 |
| - ->getContainer() |
51 |
| - ->get(QueryBuilderFactoryInterface::class) |
| 49 | + ContainerFacade::get(ConnectionFactoryInterface::class) |
52 | 50 | ->create()
|
53 |
| - ->getConnection(); |
54 |
| - |
55 |
| - $connection->executeStatement( |
56 |
| - file_get_contents( |
57 |
| - __DIR__ . '/../Fixtures/dump.sql' |
58 |
| - ) |
59 |
| - ); |
| 51 | + ->executeStatement( |
| 52 | + file_get_contents( |
| 53 | + __DIR__ . '/../Fixtures/dump.sql' |
| 54 | + ) |
| 55 | + ); |
60 | 56 |
|
61 | 57 | \OxidEsales\Eshop\Core\Registry::getLang()->resetBaseLanguage();
|
62 | 58 |
|
63 | 59 | if (static::$container !== null) {
|
64 | 60 | return;
|
65 | 61 | }
|
| 62 | + |
66 | 63 | $containerFactory = new TestContainerFactory();
|
67 | 64 | static::$container = $containerFactory->create();
|
68 | 65 |
|
@@ -97,6 +94,14 @@ public function setUp(): void
|
97 | 94 | 'oxidesales.graphqlbase.cacheadapter',
|
98 | 95 | $cache
|
99 | 96 | );
|
| 97 | + static::$container->setParameter( |
| 98 | + 'oxid_esales.db.replicate', |
| 99 | + false |
| 100 | + ); |
| 101 | + static::$container->setParameter( |
| 102 | + 'oxid_esales.db.replicas', |
| 103 | + [] |
| 104 | + ); |
100 | 105 |
|
101 | 106 | static::beforeContainerCompile();
|
102 | 107 |
|
@@ -194,8 +199,7 @@ protected function uploadFile(
|
194 | 199 | $boundary = '-------------' . uniqid();
|
195 | 200 | $postData = $this->buildFileUpload($boundary, $fields, $map, $files);
|
196 | 201 |
|
197 |
| - $facts = new Facts(); |
198 |
| - $ch = curl_init($facts->getShopUrl() . '/graphql?lang=0&shp=1'); |
| 202 | + $ch = curl_init(getenv('OXID_SHOP_BASE_URL') . '/graphql?lang=0&shp=1'); |
199 | 203 |
|
200 | 204 | $headers = [
|
201 | 205 | 'Connection: keep-alive',
|
|
0 commit comments