assertEquals(self::STRING_ENCODED, QrCode::encode(self::STRING_TO_ENCODE)); } /** * @test */ public function test_decode_valid_image_returns_correct_value() { $file = LocalFile::fake()->validQrcode(); $this->assertEquals(self::DECODED_IMAGE, QrCode::decode($file)); } /** * @test */ public function test_decode_invalid_image_returns_correct_value() { $this->expectException(\App\Exceptions\InvalidQrCodeException::class); QrCode::decode(LocalFile::fake()->invalidQrcode()); } }