test(gitea): exercise startFetch()/resolveFetch() instead of fetch()

This commit is contained in:
2026-07-07 13:31:59 +02:00
parent 5c47888a49
commit c89b4e9212
@@ -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);
} }