| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public function testFetchMilestoneIssues() : void |
||
| 21 | { |
||
| 22 | $response1 = new IssueClientResponse(['items' => [1]], 'https://www.google.com'); |
||
| 23 | $response2 = new IssueClientResponse(['items' => [2]], null); |
||
| 24 | |||
| 25 | $this->issueClient->expects($this->at(0)) |
||
| 26 | ->method('execute') |
||
| 27 | ->with('https://api.github.com/search/issues?q=milestone%3A%221.0%22+repo%3Ajwage%2Fchangelog-generator+state%3Aclosed') |
||
| 28 | ->willReturn($response1); |
||
| 29 | |||
| 30 | $this->issueClient->expects($this->at(1)) |
||
| 31 | ->method('execute') |
||
| 32 | ->with('https://www.google.com') |
||
| 33 | ->willReturn($response2); |
||
| 34 | |||
| 35 | $issues = $this->issueFetcher->fetchMilestoneIssues('jwage', 'changelog-generator', '1.0'); |
||
| 36 | |||
| 37 | self::assertEquals([1, 2], $issues); |
||
| 38 | } |
||
| 47 |