mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-13 01:51:50 +01:00
Reformat code automatically
This commit is contained in:
@@ -24,6 +24,29 @@ use Meritoo\Common\Type\OopVisibilityType;
|
||||
*/
|
||||
class TemplateNotFoundExceptionTest extends BaseTestCase
|
||||
{
|
||||
public function provideIndexAndException(): ?Generator
|
||||
{
|
||||
$template = 'Template with \'%s\' index was not found. Did you provide all required templates?';
|
||||
|
||||
yield [
|
||||
'An empty string',
|
||||
'',
|
||||
new TemplateNotFoundException(sprintf($template, '')),
|
||||
];
|
||||
|
||||
yield [
|
||||
'Non-empty string',
|
||||
'test',
|
||||
new TemplateNotFoundException(sprintf($template, 'test')),
|
||||
];
|
||||
|
||||
yield [
|
||||
'Integer',
|
||||
'2',
|
||||
new TemplateNotFoundException(sprintf($template, 2)),
|
||||
];
|
||||
}
|
||||
|
||||
public function testConstructor(): void
|
||||
{
|
||||
static::assertConstructorVisibilityAndArguments(
|
||||
@@ -45,27 +68,4 @@ class TemplateNotFoundExceptionTest extends BaseTestCase
|
||||
$created = TemplateNotFoundException::create($index);
|
||||
static::assertEquals($expected, $created, $description);
|
||||
}
|
||||
|
||||
public function provideIndexAndException(): ?Generator
|
||||
{
|
||||
$template = 'Template with \'%s\' index was not found. Did you provide all required templates?';
|
||||
|
||||
yield[
|
||||
'An empty string',
|
||||
'',
|
||||
new TemplateNotFoundException(sprintf($template, '')),
|
||||
];
|
||||
|
||||
yield[
|
||||
'Non-empty string',
|
||||
'test',
|
||||
new TemplateNotFoundException(sprintf($template, 'test')),
|
||||
];
|
||||
|
||||
yield[
|
||||
'Integer',
|
||||
'2',
|
||||
new TemplateNotFoundException(sprintf($template, 2)),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user