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

@@ -20,10 +20,30 @@ use Meritoo\Common\Type\OopVisibilityType;
* @copyright Meritoo <http://www.meritoo.pl>
*
* @internal
* @covers \Meritoo\Common\Exception\File\EmptyFileException
* @covers \Meritoo\Common\Exception\File\EmptyFileException
*/
class EmptyFileExceptionTest extends BaseTestCase
{
/**
* Provides path of the empty file and expected exception's message
*
* @return Generator
*/
public function providePathOfFile()
{
$template = 'File with path \'%s\' is empty (has no content). Did you provide path of proper file?';
yield [
'aa/bb/cc',
sprintf($template, 'aa/bb/cc'),
];
yield [
'images/show/car.jpg',
sprintf($template, 'images/show/car.jpg'),
];
}
public function testConstructorVisibilityAndArguments()
{
static::assertConstructorVisibilityAndArguments(EmptyFileException::class, OopVisibilityType::IS_PUBLIC, 3);
@@ -40,24 +60,4 @@ class EmptyFileExceptionTest extends BaseTestCase
$exception = EmptyFileException::create($emptyFilePath);
static::assertSame($expectedMessage, $exception->getMessage());
}
/**
* Provides path of the empty file and expected exception's message
*
* @return Generator
*/
public function providePathOfFile()
{
$template = 'File with path \'%s\' is empty (has no content). Did you provide path of proper file?';
yield[
'aa/bb/cc',
sprintf($template, 'aa/bb/cc'),
];
yield[
'images/show/car.jpg',
sprintf($template, 'images/show/car.jpg'),
];
}
}

View File

@@ -19,18 +19,18 @@ use Meritoo\Common\Type\OopVisibilityType;
* @copyright Meritoo <http://www.meritoo.pl>
*
* @internal
* @covers \Meritoo\Common\Exception\File\EmptyFilePathException
* @covers \Meritoo\Common\Exception\File\EmptyFilePathException
*/
class EmptyFilePathExceptionTest extends BaseTestCase
{
public function testConstructorVisibilityAndArguments()
{
static::assertConstructorVisibilityAndArguments(EmptyFilePathException::class, OopVisibilityType::IS_PUBLIC, 3);
}
public function testConstructorMessage()
{
$exception = EmptyFilePathException::create();
static::assertSame('Path of the file is empty. Did you provide path of proper file?', $exception->getMessage());
}
public function testConstructorVisibilityAndArguments()
{
static::assertConstructorVisibilityAndArguments(EmptyFilePathException::class, OopVisibilityType::IS_PUBLIC, 3);
}
}

View File

@@ -20,13 +20,28 @@ use Meritoo\Common\Type\OopVisibilityType;
* @copyright Meritoo <http://www.meritoo.pl>
*
* @internal
* @covers \Meritoo\Common\Exception\File\NotExistingFileException
* @covers \Meritoo\Common\Exception\File\NotExistingFileException
*/
class NotExistingFileExceptionTest extends BaseTestCase
{
public function testConstructorVisibilityAndArguments()
/**
* Provides path of not existing file and expected exception's message
*
* @return Generator
*/
public function providePathOfFile()
{
static::assertConstructorVisibilityAndArguments(NotExistingFileException::class, OopVisibilityType::IS_PUBLIC, 3);
$template = 'File with path \'%s\' does not exist (or is not readable). Did you provide path of proper file?';
yield [
'aa/bb/cc',
sprintf($template, 'aa/bb/cc'),
];
yield [
'images/show/car.jpg',
sprintf($template, 'images/show/car.jpg'),
];
}
/**
@@ -41,23 +56,8 @@ class NotExistingFileExceptionTest extends BaseTestCase
static::assertSame($expectedMessage, $exception->getMessage());
}
/**
* Provides path of not existing file and expected exception's message
*
* @return Generator
*/
public function providePathOfFile()
public function testConstructorVisibilityAndArguments()
{
$template = 'File with path \'%s\' does not exist (or is not readable). Did you provide path of proper file?';
yield[
'aa/bb/cc',
sprintf($template, 'aa/bb/cc'),
];
yield[
'images/show/car.jpg',
sprintf($template, 'images/show/car.jpg'),
];
static::assertConstructorVisibilityAndArguments(NotExistingFileException::class, OopVisibilityType::IS_PUBLIC, 3);
}
}