Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Commit

Permalink
Replace mismatched varray/array dataproviders with vec
Browse files Browse the repository at this point in the history
Needed for tests to pass on recent releases
  • Loading branch information
fredemmott committed Jul 2, 2020
1 parent cb18f6b commit d7384b9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/RouterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ public function testCanGetExpatchedMatchesWithResolvers(): void {
}

public function getAllResolvers(
): array<
): vec<
(
string,
(function(dict<HttpMethod, dict<string, string>>): IResolver<string>),
)
> {
return varray[
return vec[
tuple('simple regexp', $map ==> new SimpleRegexpResolver($map)),
tuple(
'prefix matching',
Expand All @@ -105,11 +105,11 @@ public function getAllResolvers(
}

public function expectedMatchesWithResolvers(
): array<(string, IResolver<string>, string, string, dict<string, string>)> {
): vec<(string, IResolver<string>, string, string, dict<string, string>)> {
$map = dict[HttpMethod::GET => dict(self::MAP)];
$resolvers = Dict\from_entries($this->getAllResolvers());

$out = varray[];
$out = vec[];
$examples = $this->expectedMatches();
foreach ($resolvers as $name => $resolver) {
$resolver = $resolver($map);
Expand Down

0 comments on commit d7384b9

Please sign in to comment.