Skip to content

Commit

Permalink
Test to prove that the delete file job will make an uncaught exceptio…
Browse files Browse the repository at this point in the history
…n in some cases #2814
  • Loading branch information
Josh Pollock committed Nov 21, 2018
1 parent 3599677 commit 523697d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/Integration/Jobs/DeleteFileJobTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,17 @@ public function testHandle()
//make sure it is deleted
$this->assertFalse(file_exists($file['tmp_name']));
}

/**
* @since 1.8.0
*
* @covers \calderawp\calderaforms\cf2\Jobs\DeleteFileJob::handle()
*/
public function testHandleWithNonExistantFile()
{

$job = new DeleteFileJob('noms/foods' );
$job->handle(); // an exception being thrown here would be bad.
$this->assertTrue(true);//@see https://github.com/sebastianbergmann/phpunit/issues/2484
}
}

0 comments on commit 523697d

Please sign in to comment.