From 91e975254c55f7dc4d33137ead48af050e943c09 Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Sun, 28 Jul 2024 21:56:49 +0000 Subject: [PATCH] Updated 1 files --- tests/Unit/GedcomExporterTest.php | 37 ++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/tests/Unit/GedcomExporterTest.php b/tests/Unit/GedcomExporterTest.php index 4280fb3..e1f9c1d 100644 --- a/tests/Unit/GedcomExporterTest.php +++ b/tests/Unit/GedcomExporterTest.php @@ -1,3 +1,31 @@ +once() + ->andThrow(new \Exception('Failed to write file')); + + $this->artisan('gedcom:export', ['filename' => 'test_export']) + ->expectsOutput('An error occurred while exporting the GEDCOM file: Failed to write file') + ->assertExitCode(1); + } + public static function exportDataProvider() { return [ @@ -18,4 +46,11 @@ public static function exportDataProvider() "0 @M1@ OBJE\n1 TITL Photo of John Doe\n" ], ]; - } \ No newline at end of file + } + + public function tearDown(): void + { + Mockery::close(); + parent::tearDown(); + } +} \ No newline at end of file