Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | public function getById_WithValidId_ValidResponse() |
||
31 | { |
||
32 | $this->mockClient() |
||
33 | ->expects($this->once()) |
||
34 | ->method('get') |
||
35 | ->with('products/121') |
||
36 | ->willReturn($this->buildResponse('Products/getById')); |
||
37 | |||
38 | $product = $this->service->getById(new ProductId(121)); |
||
39 | |||
40 | $this->assertInstanceOf(Product::class, $product); |
||
41 | |||
42 | $this->assertEquals('test', $product->getLabel()); |
||
43 | $this->assertEquals(121, $product->getId()); |
||
44 | $this->assertEquals('86768795768484', $product->getBarcode()); |
||
45 | } |
||
47 |