expectNotToPerformAssertions(); Discovery::verify(file_get_contents(self::TEST_DATA_DIR . '/server_list.json.minisig'), file_get_contents(self::TEST_DATA_DIR . '/server_list.json'), 'server_list.json', 10); } public function testInvalidSignature(): void { $this->expectException(InvalidSignatureException::class); Discovery::verify(file_get_contents(self::TEST_DATA_DIR . '/random.txt'), file_get_contents(self::TEST_DATA_DIR . '/server_list.json'), 'server_list.json', 0); } public function testWrongKey(): void { $this->expectException(InvalidSignatureUnknownKeyException::class); Discovery::verify(file_get_contents(self::TEST_DATA_DIR . '/server_list.json.wrong_key.minisig'), file_get_contents(self::TEST_DATA_DIR . '/server_list.json'), 'server_list.json', 0); } public function testOldSignature(): void { $this->expectException(SignatureTooOldException::class); Discovery::verify(file_get_contents(self::TEST_DATA_DIR . '/server_list.json.minisig'), file_get_contents(self::TEST_DATA_DIR . '/server_list.json'), 'server_list.json', 11); } public function testUnknownExpectedFileName(): void { $this->expectException(InvalidArgumentException::class); Discovery::verify(file_get_contents(self::TEST_DATA_DIR . '/other_list.json.minisig'), file_get_contents(self::TEST_DATA_DIR . '/other_list.json'), 'other_list.json', 0); } }