<?php
/**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
namespace Friendica\Test\src\Util;
-use Friendica\Core\Config\Cache\Cache;
-use Friendica\Core\Config\IConfig;
+use Friendica\Core\Config\ValueObject\Cache;
+use Friendica\Core\Config\Capability\IManageConfigValues;
use Friendica\Test\MockedTest;
use Friendica\Util\Profiler;
use Mockery\MockInterface;
foreach ($data as $perf => $items) {
foreach ($items['functions'] as $function) {
// assert that the output contains the functions
- self::assertRegExp('/' . $function . ': \d+/', $output);
+ self::assertMatchesRegularExpression('/' . $function . ': \d+/', $output);
}
}
}
$profiler->saveTimestamp(time(), 'network', 'test1');
- $config = \Mockery::mock(IConfig::class);
+ $config = \Mockery::mock(IManageConfigValues::class);
$config->shouldReceive('get')
->with('system', 'profiler')
->andReturn(false)
self::assertTrue($profiler->isRendertime());
$output = $profiler->getRendertimeString();
- self::assertRegExp('/test1: \d+/', $output);
- self::assertRegExp('/test2: \d+/', $output);
+ self::assertMatchesRegularExpression('/test1: \d+/', $output);
+ self::assertMatchesRegularExpression('/test2: \d+/', $output);
}
}