diff --git a/tests/src/Core/Cache/DatabaseCacheTest.php b/tests/src/Core/Cache/DatabaseCacheTest.php index 458f3faa2..0d57f7128 100644 --- a/tests/src/Core/Cache/DatabaseCacheTest.php +++ b/tests/src/Core/Cache/DatabaseCacheTest.php @@ -49,6 +49,8 @@ class DatabaseCacheTest extends CacheTest { $logger = new NullLogger(); $profiler = Mockery::mock(Profiler::class); + $profiler->shouldReceive('startRecording'); + $profiler->shouldReceive('stopRecording'); $profiler->shouldReceive('saveTimestamp')->withAnyArgs()->andReturn(true); // load real config to avoid mocking every config-entry which is related to the Database class diff --git a/tests/src/Core/Lock/DatabaseLockDriverTest.php b/tests/src/Core/Lock/DatabaseLockDriverTest.php index bc4a9a63b..f7db9d8b4 100644 --- a/tests/src/Core/Lock/DatabaseLockDriverTest.php +++ b/tests/src/Core/Lock/DatabaseLockDriverTest.php @@ -51,6 +51,8 @@ class DatabaseLockDriverTest extends LockTest { $logger = new NullLogger(); $profiler = Mockery::mock(Profiler::class); + $profiler->shouldReceive('startRecording'); + $profiler->shouldReceive('stopRecording'); $profiler->shouldReceive('saveTimestamp')->withAnyArgs()->andReturn(true); // load real config to avoid mocking every config-entry which is related to the Database class diff --git a/tests/src/Core/StorageManagerTest.php b/tests/src/Core/StorageManagerTest.php index 618b5e33c..deb9c4b11 100644 --- a/tests/src/Core/StorageManagerTest.php +++ b/tests/src/Core/StorageManagerTest.php @@ -69,6 +69,8 @@ class StorageManagerTest extends DatabaseTest $this->logger = new NullLogger(); $profiler = \Mockery::mock(Profiler::class); + $profiler->shouldReceive('startRecording'); + $profiler->shouldReceive('stopRecording'); $profiler->shouldReceive('saveTimestamp')->withAnyArgs()->andReturn(true); // load real config to avoid mocking every config-entry which is related to the Database class diff --git a/tests/src/Model/ProcessTest.php b/tests/src/Model/ProcessTest.php index b6e610238..0410ff2de 100644 --- a/tests/src/Model/ProcessTest.php +++ b/tests/src/Model/ProcessTest.php @@ -27,6 +27,8 @@ class ProcessTest extends DatabaseTest $logger = new NullLogger(); $profiler = \Mockery::mock(Profiler::class); + $profiler->shouldReceive('startRecording'); + $profiler->shouldReceive('stopRecording'); $profiler->shouldReceive('saveTimestamp')->withAnyArgs()->andReturn(true); // load real config to avoid mocking every config-entry which is related to the Database class diff --git a/tests/src/Model/Storage/DatabaseStorageTest.php b/tests/src/Model/Storage/DatabaseStorageTest.php index 45793b47a..21d6e1865 100644 --- a/tests/src/Model/Storage/DatabaseStorageTest.php +++ b/tests/src/Model/Storage/DatabaseStorageTest.php @@ -51,6 +51,8 @@ class DatabaseStorageTest extends StorageTest { $logger = new NullLogger(); $profiler = \Mockery::mock(Profiler::class); + $profiler->shouldReceive('startRecording'); + $profiler->shouldReceive('stopRecording'); $profiler->shouldReceive('saveTimestamp')->withAnyArgs()->andReturn(true); // load real config to avoid mocking every config-entry which is related to the Database class diff --git a/tests/src/Model/Storage/FilesystemStorageTest.php b/tests/src/Model/Storage/FilesystemStorageTest.php index deb453a04..ebe29f0c4 100644 --- a/tests/src/Model/Storage/FilesystemStorageTest.php +++ b/tests/src/Model/Storage/FilesystemStorageTest.php @@ -52,6 +52,8 @@ class FilesystemStorageTest extends StorageTest { $logger = new NullLogger(); $profiler = \Mockery::mock(Profiler::class); + $profiler->shouldReceive('startRecording'); + $profiler->shouldReceive('stopRecording'); $profiler->shouldReceive('saveTimestamp')->withAnyArgs()->andReturn(true); /** @var MockInterface|L10n $l10n */ diff --git a/tests/src/Util/Logger/ProfilerLoggerTest.php b/tests/src/Util/Logger/ProfilerLoggerTest.php index 7719292b0..0a63b4381 100644 --- a/tests/src/Util/Logger/ProfilerLoggerTest.php +++ b/tests/src/Util/Logger/ProfilerLoggerTest.php @@ -59,6 +59,8 @@ class ProfilerLoggerTest extends MockedTest $logger = new ProfilerLogger($this->logger, $this->profiler); $this->logger->shouldReceive($function)->with($message, $context)->once(); + $this->profiler->shouldReceive('startRecording'); + $this->profiler->shouldReceive('stopRecording'); $this->profiler->shouldReceive('saveTimestamp')->with(\Mockery::any(), 'file')->once(); $logger->$function($message, $context); } @@ -72,6 +74,8 @@ class ProfilerLoggerTest extends MockedTest $logger = new ProfilerLogger($this->logger, $this->profiler); $this->logger->shouldReceive('log')->with(LogLevel::WARNING, 'test', ['a' => 'context'])->once(); + $this->profiler->shouldReceive('startRecording'); + $this->profiler->shouldReceive('stopRecording'); $this->profiler->shouldReceive('saveTimestamp')->with(\Mockery::any(), 'file')->once(); $logger->log(LogLevel::WARNING, 'test', ['a' => 'context']);