Remove @expectedException annotation
This commit is contained in:
1 parent
7274226b75
commit
3851e05f83
20 files changed
+173
-74
No files matched your search
@@ -2,12 +2,14 @@
|
||||
|
||||
namespace Box\Spout\Common\Helper;
|
||||
|
||||
use Box\Spout\Common\Exception\IOException;
|
||||
|
||||
/**
|
||||
* Class FileSystemHelperTest
|
||||
*/
|
||||
class FileSystemHelperTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
/** @var \Box\Spout\Writer\Helper\XLSX\FileSystemHelper */
|
||||
/** @var \Box\Spout\Writer\XLSX\Helper\FileSystemHelper */
|
||||
protected $fileSystemHelper;
|
||||
|
||||
/**
|
||||
@@ -20,38 +22,42 @@ class FileSystemHelperTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Box\Spout\Common\Exception\IOException
|
||||
* @return void
|
||||
*/
|
||||
public function testCreateFolderShouldThrowExceptionIfOutsideOfBaseFolder()
|
||||
{
|
||||
$this->expectException(IOException::class);
|
||||
|
||||
$this->fileSystemHelper->createFolder('/tmp/folder_outside_base_folder', 'folder_name');
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Box\Spout\Common\Exception\IOException
|
||||
* @return void
|
||||
*/
|
||||
public function testCreateFileWithContentsShouldThrowExceptionIfOutsideOfBaseFolder()
|
||||
{
|
||||
$this->expectException(IOException::class);
|
||||
|
||||
$this->fileSystemHelper->createFileWithContents('/tmp/folder_outside_base_folder', 'file_name', 'contents');
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Box\Spout\Common\Exception\IOException
|
||||
* @return void
|
||||
*/
|
||||
public function testDeleteFileShouldThrowExceptionIfOutsideOfBaseFolder()
|
||||
{
|
||||
$this->expectException(IOException::class);
|
||||
|
||||
$this->fileSystemHelper->deleteFile('/tmp/folder_outside_base_folder/file_name');
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Box\Spout\Common\Exception\IOException
|
||||
* @return void
|
||||
*/
|
||||
public function testDeleteFolderRecursivelyShouldThrowExceptionIfOutsideOfBaseFolder()
|
||||
{
|
||||
$this->expectException(IOException::class);
|
||||
|
||||
$this->fileSystemHelper->deleteFolderRecursively('/tmp/folder_outside_base_folder');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user