Completed
Push — master ( 81f65b...2eb696 )
by Fabian
26s queued 10s
created

IndexFailed   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A becauseInitiallyTriggeredInTransaction() 0 19 1
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
}