Skip to content

Commit b75f670

Browse files
authored
Minor fix readme and improve tests (#17)
1 parent 9b3d951 commit b75f670

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ The package tests are checked with [Infection](https://infection.github.io/) mut
170170
./vendor/bin/infection
171171
```
172172

173-
## Static analysis
173+
### Static analysis
174174

175175
The code is statically analyzed with [Psalm](https://psalm.dev/). To run static analysis:
176176

‎tests/CryptTest.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public function testDecryptByPasswordShouldThrowExceptionForTamperedData(): void
4343
$data = 'known data';
4444
$key = 'secret';
4545

46+
$this->expectExceptionMessage('Failed to decrypt data.');
4647
$this->expectException(AuthenticationException::class);
4748

4849
$encryptedData = $crypt->encryptByPassword($data, $key);

‎tests/MacTest.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ public function testDataTamperingIsDetected(): void
6262
$signedData = $mac->sign($data, $key);
6363
$signedData[strlen($signedData) - 1] = 'A';
6464

65+
$this->expectExceptionMessage('Data does not match signature.');
6566
$this->expectException(DataIsTamperedException::class);
6667
$mac->getMessage($signedData, $key);
6768
}

0 commit comments

Comments
 (0)