Reformat code automatically

This commit is contained in:
Meritoo
2022-02-12 14:46:47 +01:00
parent a3af138f0c
commit a3adae50b8
116 changed files with 19152 additions and 19091 deletions

View File

@@ -12,6 +12,7 @@ use Generator;
use Meritoo\Common\Exception\Reflection\MissingChildClassesException;
use Meritoo\Common\Test\Base\BaseTestCase;
use Meritoo\Common\Type\OopVisibilityType;
use stdClass;
/**
* Test case of an exception used while given class has no child classes
@@ -24,6 +25,30 @@ use Meritoo\Common\Type\OopVisibilityType;
*/
class MissingChildClassesExceptionTest extends BaseTestCase
{
/**
* Provides name of class that hasn't child classes, but it should, and expected exception's message
*
* @return Generator
*/
public function provideParentClass(): ?Generator
{
$template = 'The \'%s\' class requires one child class at least who will extend her (maybe is an abstract'
.' class), but the child classes are missing. Did you forget to extend this class?';
yield [
MissingChildClassesException::class,
sprintf($template, MissingChildClassesException::class),
];
yield [
[
new stdClass(),
new stdClass(),
],
sprintf($template, stdClass::class),
];
}
public function testConstructorVisibilityAndArguments(): void
{
static::assertConstructorVisibilityAndArguments(
@@ -45,28 +70,4 @@ class MissingChildClassesExceptionTest extends BaseTestCase
$exception = MissingChildClassesException::create($parentClass);
static::assertSame($expectedMessage, $exception->getMessage());
}
/**
* Provides name of class that hasn't child classes, but it should, and expected exception's message
*
* @return Generator
*/
public function provideParentClass(): ?Generator
{
$template = 'The \'%s\' class requires one child class at least who will extend her (maybe is an abstract'
. ' class), but the child classes are missing. Did you forget to extend this class?';
yield[
MissingChildClassesException::class,
sprintf($template, MissingChildClassesException::class),
];
yield[
[
new \stdClass(),
new \stdClass(),
],
sprintf($template, \stdClass::class),
];
}
}