2626use Yiisoft \Factory \Definitions \Reference ;
2727use Yiisoft \Log \Logger ;
2828use Yiisoft \Profiler \Profiler ;
29+ use Yiisoft \Profiler \ProfilerInterface ;
2930
3031use function explode ;
3132use function file_get_contents ;
@@ -43,7 +44,7 @@ class TestCase extends AbstractTestCase
4344 protected string $ likeEscapeCharSql = '' ;
4445 protected array $ likeParameterReplacements = [];
4546 protected LoggerInterface $ logger ;
46- protected Profiler $ profiler ;
47+ protected ProfilerInterface $ profiler ;
4748 protected QueryCache $ queryCache ;
4849 protected SchemaCache $ schemaCache ;
4950
@@ -106,7 +107,7 @@ protected function configContainer(): void
106107
107108 $ this ->aliases = $ this ->container ->get (Aliases::class);
108109 $ this ->logger = $ this ->container ->get (LoggerInterface::class);
109- $ this ->profiler = $ this ->container ->get (Profiler ::class);
110+ $ this ->profiler = $ this ->container ->get (ProfilerInterface ::class);
110111 $ this ->cache = $ this ->container ->get (CacheInterface::class);
111112 $ this ->connection = $ this ->container ->get (ConnectionInterface::class);
112113 $ this ->queryCache = $ this ->container ->get (QueryCache::class);
@@ -291,6 +292,7 @@ private function config(): array
291292 ],
292293
293294 LoggerInterface::class => Logger::class,
295+ ProfilerInterface::class => Profiler::class,
294296
295297 ConnectionInterface::class => [
296298 '__class ' => Connection::class,
0 commit comments