Skip to content

Commit

Permalink
Merge branch '6.3' into 6.4
Browse files Browse the repository at this point in the history
* 6.3:
  [Console] Fix horizontal table top border is incorrectly rendered
  [Tests] Streamline
  [Uid] Fix UuidV7 collisions within the same ms
  [Validator] updated Romanian translation
  • Loading branch information
nicolas-grekas committed Oct 31, 2023
2 parents f2f2de6 + b2382a4 commit af6cf42
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Tests/UrlPackageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ class UrlPackageTest extends TestCase
/**
* @dataProvider getConfigs
*/
public function testGetUrl($baseUrls, $format, $path, $expected)
public function testGetUrl($baseUrls, string $format, string $path, string $expected)
{
$package = new UrlPackage($baseUrls, new StaticVersionStrategy('v1', $format));
$this->assertSame($expected, $package->getUrl($path));
}

public static function getConfigs()
public static function getConfigs(): array
{
return [
['http://example.net', '', 'http://example.com/foo', 'http://example.com/foo'],
Expand Down Expand Up @@ -65,14 +65,14 @@ public static function getConfigs()
/**
* @dataProvider getContextConfigs
*/
public function testGetUrlWithContext($secure, $baseUrls, $format, $path, $expected)
public function testGetUrlWithContext(bool $secure, $baseUrls, string $format, string $path, string $expected)
{
$package = new UrlPackage($baseUrls, new StaticVersionStrategy('v1', $format), $this->getContext($secure));

$this->assertSame($expected, $package->getUrl($path));
}

public static function getContextConfigs()
public static function getContextConfigs(): array
{
return [
[false, 'http://example.com', '', 'foo', 'http://example.com/foo?v1'],
Expand Down Expand Up @@ -116,15 +116,15 @@ public function testWrongBaseUrl($baseUrls)
new UrlPackage($baseUrls, new EmptyVersionStrategy());
}

public static function getWrongBaseUrlConfig()
public static function getWrongBaseUrlConfig(): array
{
return [
['not-a-url'],
['not-a-url-with-query?query=://'],
];
}

private function getContext($secure)
private function getContext($secure): ContextInterface
{
$context = $this->createMock(ContextInterface::class);
$context->expects($this->any())->method('isSecure')->willReturn($secure);
Expand Down

0 comments on commit af6cf42

Please sign in to comment.