Remove @expectedException annotation
This commit is contained in:
1 parent
7274226b75
commit
3851e05f83
20 files changed
+173
-74
No files matched your search
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Box\Spout\Common\Helper;
|
||||
|
||||
use Box\Spout\Common\Exception\EncodingConversionException;
|
||||
use Box\Spout\TestUsingResource;
|
||||
|
||||
/**
|
||||
@@ -57,13 +58,14 @@ class EncodingHelperTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* @dataProvider dataProviderForIconvOrMbstringUsage
|
||||
* @expectedException \Box\Spout\Common\Exception\EncodingConversionException
|
||||
*
|
||||
* @param bool $shouldUseIconv
|
||||
* @return void
|
||||
*/
|
||||
public function testAttemptConversionToUTF8ShouldThrowIfConversionFailed($shouldUseIconv)
|
||||
{
|
||||
$this->expectException(EncodingConversionException::class);
|
||||
|
||||
$helperStub = $this->getMockBuilder('\Box\Spout\Common\Helper\GlobalFunctionsHelper')
|
||||
->setMethods(['iconv', 'mb_convert_encoding'])
|
||||
->getMock();
|
||||
@@ -82,12 +84,12 @@ class EncodingHelperTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Box\Spout\Common\Exception\EncodingConversionException
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testAttemptConversionToUTF8ShouldThrowIfConversionNotSupported()
|
||||
{
|
||||
$this->expectException(EncodingConversionException::class);
|
||||
|
||||
/** @var EncodingHelper $encodingHelperStub */
|
||||
$encodingHelperStub = $this->getMockBuilder('\Box\Spout\Common\Helper\EncodingHelper')
|
||||
->disableOriginalConstructor()
|
||||
@@ -139,13 +141,14 @@ class EncodingHelperTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* @dataProvider dataProviderForIconvOrMbstringUsage
|
||||
* @expectedException \Box\Spout\Common\Exception\EncodingConversionException
|
||||
*
|
||||
* @param bool $shouldUseIconv
|
||||
* @return void
|
||||
*/
|
||||
public function testAttemptConversionFromUTF8ShouldThrowIfConversionFailed($shouldUseIconv)
|
||||
{
|
||||
$this->expectException(EncodingConversionException::class);
|
||||
|
||||
$helperStub = $this->getMockBuilder('\Box\Spout\Common\Helper\GlobalFunctionsHelper')
|
||||
->setMethods(['iconv', 'mb_convert_encoding'])
|
||||
->getMock();
|
||||
@@ -164,12 +167,12 @@ class EncodingHelperTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Box\Spout\Common\Exception\EncodingConversionException
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testAttemptConversionFromUTF8ShouldThrowIfConversionNotSupported()
|
||||
{
|
||||
$this->expectException(EncodingConversionException::class);
|
||||
|
||||
/** @var EncodingHelper $encodingHelperStub */
|
||||
$encodingHelperStub = $this->getMockBuilder('\Box\Spout\Common\Helper\EncodingHelper')
|
||||
->disableOriginalConstructor()
|
||||
|
||||
Reference in new issue
Block a user