MCPcopy Create free account
hub / github.com/Rello/analytics / createService

Method createService

tests/Service/StorageServiceTest.php:73–88  ·  view source on GitHub ↗
(StorageMapper $storageMapper, ?LoggerInterface $logger = null)

Source from the content-addressed store, hash-verified

71 }
72
73 private function createService(StorageMapper $storageMapper, ?LoggerInterface $logger = null): StorageService {
74 $resolver = $this->createMock(DatasetStorageResolver::class);
75 $resolver->method('resolve')->with(42)->willReturn(['mode' => DatasetStorageResolver::LEGACY]);
76 $variableService = $this->createMock(VariableService::class);
77 $variableService->method('replaceTextVariablesSingle')->willReturnArgument(0);
78
79 return new StorageService(
80 $logger ?? new NullLogger(),
81 $storageMapper,
82 $resolver,
83 $this->createMock(FlexibleStorageService::class),
84 $this->createMock(ThresholdService::class),
85 $variableService,
86 $this->createMock(ReportService::class)
87 );
88 }
89}

Calls

no outgoing calls

Tested by

no test coverage detected