| @@ 63-74 (lines=12) @@ | ||
| 60 | $this->sut = new PeerFactory($this->endorserClients); |
|
| 61 | } |
|
| 62 | ||
| 63 | public function testFromPeerOptions() |
|
| 64 | { |
|
| 65 | $this->endorserClients->method('get') |
|
| 66 | ->with('localhost:8080') |
|
| 67 | ->willReturn($this->endorserClient); |
|
| 68 | ||
| 69 | $result = $this->sut->fromPeerOptions(new PeerOptions([ |
|
| 70 | 'requests' => 'localhost:8080', |
|
| 71 | ])); |
|
| 72 | ||
| 73 | self::assertInstanceOf(Peer::class, $result); |
|
| 74 | } |
|
| 75 | ||
| 76 | public function testFromArray() |
|
| 77 | { |
|
| @@ 76-87 (lines=12) @@ | ||
| 73 | self::assertInstanceOf(Peer::class, $result); |
|
| 74 | } |
|
| 75 | ||
| 76 | public function testFromArray() |
|
| 77 | { |
|
| 78 | $this->endorserClients->method('get') |
|
| 79 | ->with('localhost:8080') |
|
| 80 | ->willReturn($this->endorserClient); |
|
| 81 | ||
| 82 | $result = $this->sut->fromArray([ |
|
| 83 | 'requests' => 'localhost:8080', |
|
| 84 | ]); |
|
| 85 | ||
| 86 | self::assertInstanceOf(Peer::class, $result); |
|
| 87 | } |
|
| 88 | ||
| 89 | /** |
|
| 90 | * @expectedException InvalidArgumentException |
|