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:
@@ -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}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user