expectException(\RuntimeException::class); Crypto::decryptString($tampered); } public function testEncryptEmptyStringProducesMalformedPayloadOnDecrypt(): void { $encrypted = Crypto::encryptString(''); $this->expectException(\RuntimeException::class); $this->expectExceptionMessage('malformed'); Crypto::decryptString($encrypted); } }