test(gitea): exercise startFetch()/resolveFetch() instead of fetch()
This commit is contained in:
@@ -78,7 +78,8 @@ final class GiteaProviderTest extends TestCase
|
|||||||
['timestamp' => $now, 'contributions' => 5],
|
['timestamp' => $now, 'contributions' => 5],
|
||||||
]));
|
]));
|
||||||
|
|
||||||
$result = $this->makeProvider(client: $client)->fetch();
|
$provider = $this->makeProvider(client: $client);
|
||||||
|
$result = $provider->resolveFetch($provider->startFetch());
|
||||||
|
|
||||||
$this->assertSame(5, $result[date('Y-m-d', $now)]);
|
$this->assertSame(5, $result[date('Y-m-d', $now)]);
|
||||||
}
|
}
|
||||||
@@ -93,7 +94,8 @@ final class GiteaProviderTest extends TestCase
|
|||||||
['timestamp' => $old, 'contributions' => 3],
|
['timestamp' => $old, 'contributions' => 3],
|
||||||
]));
|
]));
|
||||||
|
|
||||||
$result = $this->makeProvider(client: $client)->fetch();
|
$provider = $this->makeProvider(client: $client);
|
||||||
|
$result = $provider->resolveFetch($provider->startFetch());
|
||||||
|
|
||||||
$this->assertSame([], $result);
|
$this->assertSame([], $result);
|
||||||
}
|
}
|
||||||
@@ -104,7 +106,8 @@ final class GiteaProviderTest extends TestCase
|
|||||||
$client = $this->createStub(HttpClientInterface::class);
|
$client = $this->createStub(HttpClientInterface::class);
|
||||||
$client->method('request')->willReturn($this->stubResponse([]));
|
$client->method('request')->willReturn($this->stubResponse([]));
|
||||||
|
|
||||||
$result = $this->makeProvider(client: $client)->fetch();
|
$provider = $this->makeProvider(client: $client);
|
||||||
|
$result = $provider->resolveFetch($provider->startFetch());
|
||||||
|
|
||||||
$this->assertSame([], $result);
|
$this->assertSame([], $result);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user