|
14 | 14 | */
|
15 | 15 | class BlakechainTest extends TestCase
|
16 | 16 | {
|
| 17 | + /** |
| 18 | + * @throws \Exception |
| 19 | + */ |
17 | 20 | public function testBlockchain()
|
18 | 21 | {
|
19 | 22 | $chainA = new Blakechain(
|
@@ -59,7 +62,10 @@ public function testBlockchain()
|
59 | 62 | }
|
60 | 63 |
|
61 | 64 | /**
|
62 |
| - * This verifies that you can start at any arbitrary node in the chain and continue to be verified going forward. |
| 65 | + * This verifies that you can start at any arbitrary node in the chain and |
| 66 | + * continue to be verified going forward. |
| 67 | + * |
| 68 | + * @throws \Exception |
63 | 69 | */
|
64 | 70 | public function testChaining()
|
65 | 71 | {
|
@@ -102,6 +108,10 @@ public function testChaining()
|
102 | 108 | }
|
103 | 109 | }
|
104 | 110 |
|
| 111 | + /** |
| 112 | + * @throws \SodiumException |
| 113 | + * @throws \Exception |
| 114 | + */ |
105 | 115 | public function testSummaryHashUpdate()
|
106 | 116 | {
|
107 | 117 | $chain = new Blakechain(
|
@@ -132,6 +142,8 @@ public function testSummaryHashUpdate()
|
132 | 142 | /**
|
133 | 143 | * Verify that we get the same summary hash piecewise as we
|
134 | 144 | * do in one fell swoop.
|
| 145 | + * |
| 146 | + * @throws \Exception |
135 | 147 | */
|
136 | 148 | public function testSummaryHash()
|
137 | 149 | {
|
@@ -186,17 +198,15 @@ public function testSummaryHash()
|
186 | 198 |
|
187 | 199 | $this->assertSame(
|
188 | 200 | $chainA->getSummaryHash(),
|
189 |
| - $chainC->getSummaryHash() |
190 |
| - ); |
191 |
| - |
192 |
| - $this->assertSame( |
193 |
| - $chainA->getSummaryHashState(), $chainB->getSummaryHashState() |
| 201 | + $chainB->getSummaryHash() |
194 | 202 | );
|
195 | 203 | $this->assertSame(
|
196 |
| - $chainB->getSummaryHashState(), $chainC->getSummaryHashState() |
| 204 | + $chainB->getSummaryHash(), |
| 205 | + $chainC->getSummaryHash() |
197 | 206 | );
|
198 | 207 | $this->assertSame(
|
199 |
| - $chainA->getSummaryHashState(), $chainC->getSummaryHashState() |
| 208 | + $chainA->getSummaryHash(), |
| 209 | + $chainC->getSummaryHash() |
200 | 210 | );
|
201 | 211 |
|
202 | 212 | $chainA->appendData('');
|
|
0 commit comments