1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace Gember\RdbmsEventStoreDoctrineDbal\Test\Saga\TableSchema; |
6
|
|
|
|
7
|
|
|
use Gember\RdbmsEventStoreDoctrineDbal\Saga\TableSchema\SagaTableSchemaFactory; |
|
|
|
|
8
|
|
|
use PHPUnit\Framework\TestCase; |
9
|
|
|
use PHPUnit\Framework\Attributes\Test; |
|
|
|
|
10
|
|
|
|
11
|
|
|
/** |
12
|
|
|
* @internal |
13
|
|
|
*/ |
14
|
|
|
final class SagaTableSchemaFactoryTest extends TestCase |
15
|
|
|
{ |
16
|
|
|
#[Test] |
17
|
|
|
public function itShouldCreateDefaultEventStoreTableSchema(): void |
18
|
|
|
{ |
19
|
|
|
$schema = SagaTableSchemaFactory::createDefaultSagaStore(); |
20
|
|
|
|
21
|
|
|
self::assertSame('saga_store', $schema->tableName); |
22
|
|
|
self::assertSame('saga_id', $schema->sagaIdFieldName); |
23
|
|
|
self::assertSame('saga_name', $schema->sagaNameFieldName); |
24
|
|
|
self::assertSame('payload', $schema->payloadFieldName); |
25
|
|
|
self::assertSame('created_at', $schema->createdAtFieldName); |
26
|
|
|
self::assertSame('Y-m-d H:i:s.u', $schema->createdAtFieldFormat); |
27
|
|
|
self::assertSame('updated_at', $schema->updatedAtFieldName); |
28
|
|
|
self::assertSame('Y-m-d H:i:s.u', $schema->updatedAtFieldFormat); |
29
|
|
|
} |
30
|
|
|
|
31
|
|
|
#[Test] |
32
|
|
|
public function itShouldCreateCustomEventStoreTableSchema(): void |
33
|
|
|
{ |
34
|
|
|
$schema = SagaTableSchemaFactory::createDefaultSagaStore( |
35
|
|
|
'custom_saga_store', |
36
|
|
|
'custom_saga_id', |
37
|
|
|
'custom_saga_name', |
38
|
|
|
'custom_payload', |
39
|
|
|
'custom_created_at', |
40
|
|
|
'custom_created_at_format', |
41
|
|
|
'custom_updated_at', |
42
|
|
|
'custom_updated_at_format', |
43
|
|
|
); |
44
|
|
|
|
45
|
|
|
self::assertSame('custom_saga_store', $schema->tableName); |
46
|
|
|
self::assertSame('custom_saga_id', $schema->sagaIdFieldName); |
47
|
|
|
self::assertSame('custom_saga_name', $schema->sagaNameFieldName); |
48
|
|
|
self::assertSame('custom_payload', $schema->payloadFieldName); |
49
|
|
|
self::assertSame('custom_created_at', $schema->createdAtFieldName); |
50
|
|
|
self::assertSame('custom_created_at_format', $schema->createdAtFieldFormat); |
51
|
|
|
self::assertSame('custom_updated_at', $schema->updatedAtFieldName); |
52
|
|
|
self::assertSame('custom_updated_at_format', $schema->updatedAtFieldFormat); |
53
|
|
|
} |
54
|
|
|
} |
55
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths