| Total Complexity | 2 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | final class IssueFetcherTest extends TestCase |
||
| 15 | { |
||
| 16 | /** @var MockObject&IssueClient */ |
||
| 17 | private $issueClient; |
||
| 18 | |||
| 19 | private IssueFetcher $issueFetcher; |
||
| 20 | |||
| 21 | public function testFetchMilestoneIssues(): void |
||
| 22 | { |
||
| 23 | $response1 = new IssueClientResponse(['items' => [1]], 'https://www.google.com'); |
||
| 24 | $response2 = new IssueClientResponse(['items' => [2]], null); |
||
| 25 | |||
| 26 | $this->issueClient->method('execute') |
||
|
|
|||
| 27 | ->willReturnMap([ |
||
| 28 | [ |
||
| 29 | 'https://api.github.com/search/issues?q=milestone%3A%221.0%22+repo%3Ajwage%2Fchangelog-generator+state%3Aclosed', |
||
| 30 | null, |
||
| 31 | $response1, |
||
| 32 | ], |
||
| 33 | [ |
||
| 34 | 'https://www.google.com', |
||
| 35 | null, |
||
| 36 | $response2, |
||
| 37 | ], |
||
| 38 | ]); |
||
| 39 | |||
| 40 | $changelogConfig = new ChangelogConfig('jwage', 'changelog-generator', '1.0', []); |
||
| 41 | |||
| 42 | $issues = $this->issueFetcher->fetchMilestoneIssues($changelogConfig); |
||
| 43 | |||
| 44 | self::assertSame([1, 2], $issues); |
||
| 45 | } |
||
| 46 | |||
| 47 | protected function setUp(): void |
||
| 52 | } |
||
| 53 | } |
||
| 54 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.