Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
TestWithInMemoryDatalayer | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
givenAnInMemoryDataLayer | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | namespace Apie\Fixtures\TestHelpers; |
3 | |
4 | use Apie\Core\BoundedContext\BoundedContextId; |
5 | use Apie\Core\Datalayers\InMemory\InMemoryDatalayer; |
6 | use Apie\Core\Datalayers\Search\LazyLoadedListFilterer; |
7 | use Apie\Core\Indexing\Indexer; |
8 | |
9 | trait TestWithInMemoryDatalayer |
10 | { |
11 | private function givenAnInMemoryDataLayer(?BoundedContextId $boundedContextId = null): InMemoryDatalayer |
12 | { |
13 | return new InMemoryDatalayer( |
14 | $boundedContextId ?? new BoundedContextId('unknown'), |
15 | new LazyLoadedListFilterer(Indexer::create()) |
16 | ); |
17 | } |
18 | } |