-
-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TASK: Test
ProjectionTransactionTrait
when using external projections
CASE: $this->dbal->isTransactionActive() === false
- Loading branch information
Showing
4 changed files
with
204 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...tRepository.BehavioralTests/Tests/Functional/Subscription/ExternalProjectionErrorTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Neos\ContentRepository\BehavioralTests\Tests\Functional\Subscription; | ||
|
||
use Doctrine\DBAL\Connection; | ||
use Doctrine\DBAL\DriverManager; | ||
use Doctrine\ORM\EntityManagerInterface; | ||
use Neos\ContentRepository\BehavioralTests\TestSuite\DebugEventProjection; | ||
|
||
final class ExternalProjectionErrorTest extends AbstractSubscriptionEngineTestCase | ||
{ | ||
use ProjectionRollbackTestTrait; | ||
|
||
static Connection $secondConnection; | ||
|
||
/** @before */ | ||
public function injectExternalFakeProjection(): void | ||
{ | ||
$entityManager = $this->getObject(EntityManagerInterface::class); | ||
|
||
if (!isset(self::$secondConnection)) { | ||
self::$secondConnection = DriverManager::getConnection( | ||
$entityManager->getConnection()->getParams(), | ||
$entityManager->getConfiguration(), | ||
$entityManager->getEventManager() | ||
); | ||
} | ||
|
||
$this->secondFakeProjection = new DebugEventProjection( | ||
sprintf('cr_%s_debug_projection', self::$contentRepositoryId->value), | ||
self::$secondConnection | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.