| @@ 46-65 (lines=20) @@ | ||
| 43 | /** |
|
| 44 | * Create mocks |
|
| 45 | */ |
|
| 46 | protected function setUp() |
|
| 47 | { |
|
| 48 | $this->decriptionMock = $this |
|
| 49 | ->getMockBuilder(Description::class) |
|
| 50 | ->disableOriginalConstructor() |
|
| 51 | ->getMock(); |
|
| 52 | ||
| 53 | /** @var Repository $repository */ |
|
| 54 | $this->repositoryMock = $repository = $this |
|
| 55 | ->getMockBuilder(Repository::class) |
|
| 56 | ->disableOriginalConstructor() |
|
| 57 | ->getMock(); |
|
| 58 | ||
| 59 | $this->repositoryMock |
|
| 60 | ->expects($this->any()) |
|
| 61 | ->method('get') |
|
| 62 | ->willReturn($this->decriptionMock); |
|
| 63 | ||
| 64 | $this->loader = new OpenApiRouteLoader($repository); |
|
| 65 | } |
|
| 66 | ||
| 67 | /** |
|
| 68 | * @test |
|
| @@ 44-63 (lines=20) @@ | ||
| 41 | /** |
|
| 42 | * Create mocks |
|
| 43 | */ |
|
| 44 | protected function setUp() |
|
| 45 | { |
|
| 46 | $this->decriptionMock = $this |
|
| 47 | ->getMockBuilder(Description::class) |
|
| 48 | ->disableOriginalConstructor() |
|
| 49 | ->getMock(); |
|
| 50 | ||
| 51 | /** @var Repository $repository */ |
|
| 52 | $this->repositoryMock = $repository = $this |
|
| 53 | ->getMockBuilder(Repository::class) |
|
| 54 | ->disableOriginalConstructor() |
|
| 55 | ->getMock(); |
|
| 56 | ||
| 57 | $this->repositoryMock |
|
| 58 | ->expects($this->any()) |
|
| 59 | ->method('get') |
|
| 60 | ->willReturn($this->decriptionMock); |
|
| 61 | ||
| 62 | $this->matcher = new RequestMatcher($repository); |
|
| 63 | } |
|
| 64 | ||
| 65 | /** |
|
| 66 | * @test |
|