Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
TestWithInMemoryDatalayer
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 givenAnInMemoryDataLayer
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2namespace Apie\Fixtures\TestHelpers;
3
4use Apie\Core\BoundedContext\BoundedContextId;
5use Apie\Core\Datalayers\InMemory\InMemoryDatalayer;
6use Apie\Core\Datalayers\Search\LazyLoadedListFilterer;
7use Apie\Core\Indexing\Indexer;
8
9trait 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}