<?php
/**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2023, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
private function useBaseUrl()
{
$baseUrl = \Mockery::mock(BaseURL::class);
- $baseUrl->shouldReceive('getHostname')->andReturn('friendica.local')->once();
+ $baseUrl->shouldReceive('getHost')->andReturn('friendica.local')->once();
$dice = \Mockery::mock(Dice::class);
$dice->shouldReceive('create')->with(BaseURL::class)->andReturn($baseUrl);
- DI::init($dice);
+ DI::init($dice, true);
}
private function assertGuid($guid, $length, $prefix = '')
{
$length -= strlen($prefix);
- self::assertRegExp("/^" . $prefix . "[a-z0-9]{" . $length . "}?$/", $guid);
+ self::assertMatchesRegularExpression("/^" . $prefix . "[a-z0-9]{" . $length . "}?$/", $guid);
}
public function testGuidWithoutParameter()