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

@@ -33,6 +33,17 @@ class BaseTestCaseTraitTest extends BaseTestCase
{
use BaseTestCaseTrait;
public function testAssertConstructorVisibilityAndArgumentsUsingClassWithoutConstructor(): void
{
$this->expectException(ClassWithoutConstructorException::class);
static::assertConstructorVisibilityAndArguments(SimpleTestCase::class, OopVisibilityType::IS_PUBLIC);
}
public function testAssertHasNoConstructor(): void
{
static::assertHasNoConstructor(SimpleTestCase::class);
}
public function testAssertMethodVisibility(): void
{
$method = new ReflectionMethod(SimpleTestCase::class, 'assertMethodVisibility');
@@ -53,54 +64,6 @@ class BaseTestCaseTraitTest extends BaseTestCase
static::assertMethodVisibility($method, OopVisibilityType::IS_PRIVATE);
}
public function testAssertConstructorVisibilityAndArgumentsUsingClassWithoutConstructor(): void
{
$this->expectException(ClassWithoutConstructorException::class);
static::assertConstructorVisibilityAndArguments(SimpleTestCase::class, OopVisibilityType::IS_PUBLIC);
}
public function testAssertHasNoConstructor(): void
{
static::assertHasNoConstructor(SimpleTestCase::class);
}
public function testProvideEmptyValue(): void
{
$testCase = new SimpleTestCase();
$values = $testCase->provideEmptyValue();
$expected = [
[''],
[' '],
[null],
[0],
[false],
[[]],
];
foreach ($values as $index => $value) {
static::assertSame($expected[$index], $value);
}
}
public function testProvideEmptyScalarValue(): void
{
$testCase = new SimpleTestCase();
$values = $testCase->provideEmptyScalarValue();
$expected = [
[''],
[' '],
[null],
[0],
[false],
];
foreach ($values as $index => $value) {
static::assertSame($expected[$index], $value);
}
}
public function testProvideBooleanValue(): void
{
$testCase = new SimpleTestCase();
@@ -164,19 +127,40 @@ class BaseTestCaseTraitTest extends BaseTestCase
}
}
public function testProvideNotExistingFilePath(): void
public function testProvideEmptyScalarValue(): void
{
$testCase = new SimpleTestCase();
$paths = $testCase->provideNotExistingFilePath();
$values = $testCase->provideEmptyScalarValue();
$expected = [
['lets-test.doc'],
['lorem/ipsum.jpg'],
['surprise/me/one/more/time.txt'],
[''],
[' '],
[null],
[0],
[false],
];
foreach ($paths as $index => $path) {
static::assertSame($expected[$index], $path);
foreach ($values as $index => $value) {
static::assertSame($expected[$index], $value);
}
}
public function testProvideEmptyValue(): void
{
$testCase = new SimpleTestCase();
$values = $testCase->provideEmptyValue();
$expected = [
[''],
[' '],
[null],
[0],
[false],
[[]],
];
foreach ($values as $index => $value) {
static::assertSame($expected[$index], $value);
}
}
@@ -195,4 +179,20 @@ class BaseTestCaseTraitTest extends BaseTestCase
static::assertEquals($expected[$index], $value);
}
}
public function testProvideNotExistingFilePath(): void
{
$testCase = new SimpleTestCase();
$paths = $testCase->provideNotExistingFilePath();
$expected = [
['lets-test.doc'],
['lorem/ipsum.jpg'],
['surprise/me/one/more/time.txt'],
];
foreach ($paths as $index => $path) {
static::assertSame($expected[$index], $path);
}
}
}