mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 09:31:51 +01:00
Tests > fix "Call to undefined method setExpectedException()" bug > make compatible with PHPUnit 8.0 (and PHP 7.2+)
This commit is contained in:
@@ -49,8 +49,8 @@ class BundleTest extends BaseTestCase
|
||||
$template = 'Name of bundle \'%s\' is incorrect. It should start with big letter and end with "Bundle". Is'
|
||||
. ' there everything ok?';
|
||||
|
||||
$message = sprintf($template, $bundleName);
|
||||
$this->setExpectedException(IncorrectBundleNameException::class, $message);
|
||||
$this->expectException(IncorrectBundleNameException::class);
|
||||
$this->expectExceptionMessage(sprintf($template, $bundleName));
|
||||
|
||||
Bundle::getBundleViewPath($viewPath, $bundleName);
|
||||
}
|
||||
@@ -90,7 +90,7 @@ class BundleTest extends BaseTestCase
|
||||
*/
|
||||
public function testGetShortBundleNameUsingEmptyValue($emptyValue)
|
||||
{
|
||||
$this->setExpectedException(IncorrectBundleNameException::class);
|
||||
$this->expectException(IncorrectBundleNameException::class);
|
||||
Bundle::getShortBundleName($emptyValue);
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ class BundleTest extends BaseTestCase
|
||||
*/
|
||||
public function testGetShortBundleNameUsingIncorrectBundleName($bundleName)
|
||||
{
|
||||
$this->setExpectedException(IncorrectBundleNameException::class);
|
||||
$this->expectException(IncorrectBundleNameException::class);
|
||||
Bundle::getShortBundleName($bundleName);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user