| @@ 102-112 (lines=11) @@ | ||
| 99 | self::assertContains($this->peer, $this->sut->getPeers()); |
|
| 100 | } |
|
| 101 | ||
| 102 | public function testCanAddManyPeers() |
|
| 103 | { |
|
| 104 | $peer = $this->getMockBuilder(PeerInterface::class) |
|
| 105 | ->getMock(); |
|
| 106 | ||
| 107 | $this->sut->addPeers($this->peer, $peer); |
|
| 108 | ||
| 109 | self::assertCount(2, $this->sut->getPeers()); |
|
| 110 | self::assertContains($this->peer, $this->sut->getPeers()); |
|
| 111 | self::assertContains($peer, $this->sut->getPeers()); |
|
| 112 | } |
|
| 113 | ||
| 114 | public function testCanSetManyPeers() |
|
| 115 | { |
|
| @@ 114-127 (lines=14) @@ | ||
| 111 | self::assertContains($peer, $this->sut->getPeers()); |
|
| 112 | } |
|
| 113 | ||
| 114 | public function testCanSetManyPeers() |
|
| 115 | { |
|
| 116 | $peer = $this->getMockBuilder(PeerInterface::class) |
|
| 117 | ->getMock(); |
|
| 118 | ||
| 119 | $this->sut->setPeers([ |
|
| 120 | $this->peer, |
|
| 121 | $peer, |
|
| 122 | ]); |
|
| 123 | ||
| 124 | self::assertCount(2, $this->sut->getPeers()); |
|
| 125 | self::assertContains($this->peer, $this->sut->getPeers()); |
|
| 126 | self::assertContains($peer, $this->sut->getPeers()); |
|
| 127 | } |
|
| 128 | ||
| 129 | public function testChannelCanCreateChaincode() |
|
| 130 | { |
|
| @@ 98-108 (lines=11) @@ | ||
| 95 | self::assertContains($this->peer, $this->sut->getPeers()); |
|
| 96 | } |
|
| 97 | ||
| 98 | public function testAddManyPeers() |
|
| 99 | { |
|
| 100 | $peer = $this->getMockBuilder(PeerInterface::class) |
|
| 101 | ->getMock(); |
|
| 102 | ||
| 103 | $this->sut->addPeers($this->peer, $peer); |
|
| 104 | ||
| 105 | self::assertCount(2, $this->sut->getPeers()); |
|
| 106 | self::assertContains($this->peer, $this->sut->getPeers()); |
|
| 107 | self::assertContains($peer, $this->sut->getPeers()); |
|
| 108 | } |
|
| 109 | ||
| 110 | public function testAddPeersImmutable() |
|
| 111 | { |
|