Passed
Pull Request — master (#27)
by Fabian
03:34
created

becauseInitiallyTriggeredInTransaction()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 19
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 1
dl 0
loc 19
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace TddWizard\Fixtures\Catalog;
5
6
class IndexFailed extends \RuntimeException
7
{
8
    public static function becauseInitiallyTriggeredInTransaction(\Exception $previous): self
9
    {
10
        return new self(
11
            <<<TXT
12
The fixture could not be set up because creating index tables does not work within a transaction
13
You can either run the test without wrapping it in a transaction with:
14
15
/**
16
 * @magentoDbIsolation disabled
17
 */
18
 
19
Or set the fulltext indexer to "scheduled" before the transaction with:
20
21
/**
22
 * @magentoDataFixtureBeforeTransaction Magento/Catalog/_files/enable_reindex_schedule.php
23
 */ 
24
25
TXT
26
            , 0, $previous
27
        );
28
    }
29
}