Skip to content

Commit 942d83b

Browse files
authored
Merge pull request #704 from wmde/add-hash-test
Added missing Statement::getHash tests
2 parents 2cfcaee + f116cd5 commit 942d83b

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

tests/unit/Statement/StatementTest.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,4 +416,18 @@ private function newStatement() {
416416
return $statement;
417417
}
418418

419+
public function testHashesOfDifferentStatementsAreNotTheSame() {
420+
$this->assertNotSame(
421+
( new Statement( new PropertyNoValueSnak( 1 ) ) )->getHash(),
422+
( new Statement( new PropertyNoValueSnak( 2 ) ) )->getHash()
423+
);
424+
}
425+
426+
public function testHashesOfEqualStatementsAreTheSame() {
427+
$this->assertSame(
428+
( new Statement( new PropertyNoValueSnak( 1 ) ) )->getHash(),
429+
( new Statement( new PropertyNoValueSnak( 1 ) ) )->getHash()
430+
);
431+
}
432+
419433
}

0 commit comments

Comments
 (0)