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

@@ -19,7 +19,7 @@ use Meritoo\Common\Utilities\Composer;
* @copyright Meritoo <http://www.meritoo.pl>
*
* @internal
* @covers \Meritoo\Common\Utilities\Composer
* @covers \Meritoo\Common\Utilities\Composer
*/
class ComposerTest extends BaseTestCase
{
@@ -30,11 +30,40 @@ class ComposerTest extends BaseTestCase
*/
private $composerJsonPath;
/**
* Provides names and values of existing nodes
*
* @return Generator
*/
public function getExistingNode(): Generator
{
yield [
'name',
'test/test',
];
yield [
'version',
'1.0.2',
];
}
public function testConstructor()
{
static::assertHasNoConstructor(Composer::class);
}
/**
* @param string $nodeName Name of existing node
* @param string $nodeValue Value of existing node
*
* @dataProvider getExistingNode
*/
public function testGetValueExistingNode(string $nodeName, string $nodeValue): void
{
self::assertEquals($nodeValue, Composer::getValue($this->composerJsonPath, $nodeName));
}
public function testGetValueNotExistingComposerJson(): void
{
self::assertNull(Composer::getValue('', ''));
@@ -47,35 +76,6 @@ class ComposerTest extends BaseTestCase
self::assertNull(Composer::getValue($this->composerJsonPath, 'not_existing_node'));
}
/**
* @param string $nodeName Name of existing node
* @param string $nodeValue Value of existing node
*
* @dataProvider getExistingNode
*/
public function testGetValueExistingNode(string $nodeName, string $nodeValue): void
{
self::assertEquals($nodeValue, Composer::getValue($this->composerJsonPath, $nodeName));
}
/**
* Provides names and values of existing nodes
*
* @return Generator
*/
public function getExistingNode(): Generator
{
yield[
'name',
'test/test',
];
yield[
'version',
'1.0.2',
];
}
/**
* {@inheritdoc}
*/