mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 09:31:51 +01:00
Exceptions > create instance of exception using static "create()" method (instead of constructor)
This commit is contained in:
@@ -23,7 +23,7 @@ class CannotResolveClassNameExceptionTest extends BaseTestCase
|
||||
{
|
||||
public function testConstructorVisibilityAndArguments()
|
||||
{
|
||||
static::assertConstructorVisibilityAndArguments(CannotResolveClassNameException::class, OopVisibilityType::IS_PUBLIC, 2, 1);
|
||||
static::assertConstructorVisibilityAndArguments(CannotResolveClassNameException::class, OopVisibilityType::IS_PUBLIC, 3);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -37,7 +37,7 @@ class CannotResolveClassNameExceptionTest extends BaseTestCase
|
||||
*/
|
||||
public function testConstructorMessage($source, $forClass, $expectedMessage)
|
||||
{
|
||||
$exception = new CannotResolveClassNameException($source, $forClass);
|
||||
$exception = CannotResolveClassNameException::create($source, $forClass);
|
||||
static::assertEquals($expectedMessage, $exception->getMessage());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user