Skip to content

Commit 4c26d70

Browse files
Fix unit tests
1 parent c902d78 commit 4c26d70

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

phpunit.xml.dist

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
processIsolation="false"
1111
stopOnError="false"
1212
stopOnFailure="false"
13-
syntaxCheck="true"
1413
>
1514
<testsuites>
1615
<testsuite name="Unit Tests">

tests/BlakechainTest.php

+18-8
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
*/
1515
class BlakechainTest extends TestCase
1616
{
17+
/**
18+
* @throws \Exception
19+
*/
1720
public function testBlockchain()
1821
{
1922
$chainA = new Blakechain(
@@ -59,7 +62,10 @@ public function testBlockchain()
5962
}
6063

6164
/**
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
6369
*/
6470
public function testChaining()
6571
{
@@ -102,6 +108,10 @@ public function testChaining()
102108
}
103109
}
104110

111+
/**
112+
* @throws \SodiumException
113+
* @throws \Exception
114+
*/
105115
public function testSummaryHashUpdate()
106116
{
107117
$chain = new Blakechain(
@@ -132,6 +142,8 @@ public function testSummaryHashUpdate()
132142
/**
133143
* Verify that we get the same summary hash piecewise as we
134144
* do in one fell swoop.
145+
*
146+
* @throws \Exception
135147
*/
136148
public function testSummaryHash()
137149
{
@@ -186,17 +198,15 @@ public function testSummaryHash()
186198

187199
$this->assertSame(
188200
$chainA->getSummaryHash(),
189-
$chainC->getSummaryHash()
190-
);
191-
192-
$this->assertSame(
193-
$chainA->getSummaryHashState(), $chainB->getSummaryHashState()
201+
$chainB->getSummaryHash()
194202
);
195203
$this->assertSame(
196-
$chainB->getSummaryHashState(), $chainC->getSummaryHashState()
204+
$chainB->getSummaryHash(),
205+
$chainC->getSummaryHash()
197206
);
198207
$this->assertSame(
199-
$chainA->getSummaryHashState(), $chainC->getSummaryHashState()
208+
$chainA->getSummaryHash(),
209+
$chainC->getSummaryHash()
200210
);
201211

202212
$chainA->appendData('');

0 commit comments

Comments
 (0)