From 0808f8f65994dea32f4031f670a1f3a140e8c8ea Mon Sep 17 00:00:00 2001 From: Alexander Mashin Date: Mon, 26 Feb 2024 16:20:39 +0700 Subject: [PATCH] Update GraphFormatterTest.php --- tests/phpunit/Unit/Graph/GraphFormatterTest.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/phpunit/Unit/Graph/GraphFormatterTest.php b/tests/phpunit/Unit/Graph/GraphFormatterTest.php index 63697f49..ef5d09cc 100644 --- a/tests/phpunit/Unit/Graph/GraphFormatterTest.php +++ b/tests/phpunit/Unit/Graph/GraphFormatterTest.php @@ -119,7 +119,7 @@ class GraphFormatterTest extends \PHPUnit\Framework\TestCase { * @return GraphFormatter */ private static function graph( array $case ): GraphFormatter { - $graph = new GraphFormatter( new GraphOptions( GraphFormatterTest::BASE_PARAMS + $case['params'] ) ); + $graph = new GraphFormatter( new GraphOptions( array_merge( GraphFormatterTest::BASE_PARAMS, $case['params'] ) ) ); $nodes = []; foreach ( $case['nodes'] as $node ) { $graph_node = new GraphNode( $node['name'] ); @@ -152,7 +152,7 @@ public function provideCanConstruct(): array { } /** - * @covers GraphFormatter::__construct() + * @covers ::__construct() * @dataProvider provideCanConstruct * @param array $params * @return void @@ -182,7 +182,7 @@ public function provideGetWordWrappedText(): array { } /** - * @covers GraphFormatter::getWordWrappedText() + * @covers ::getWordWrappedText() * @dataProvider provideGetWordWrappedText * @param string $unwrapped * @param string $wrapped @@ -190,9 +190,9 @@ public function provideGetWordWrappedText(): array { */ public function testGetWordWrappedText( $unwrapped, $wrapped ) { $formatter = new GraphFormatter( - new GraphOptions( GraphFormatterTest::BASE_PARAMS + [ + new GraphOptions( array_merge( GraphFormatterTest::BASE_PARAMS, [ 'wordwraplimit' => 10 - ] ) + ] ) ) ); $this->assertEquals( $wrapped, $formatter->getWordWrappedText( $unwrapped ) ); } @@ -209,7 +209,7 @@ public function provideGetGraphLegend(): array { } /** - * @covers GraphFormatter::getGraphLegend() + * @covers ::getGraphLegend() * @dataProvider provideGetGraphLegend * @param array $params * @param string $expected The expected legend. @@ -231,7 +231,7 @@ public function provideBuildGraph(): array { } /** - * @covers GraphFormatter::buildGraph() + * @covers ::buildGraph() * @dataProvider provideBuildGraph * @param array $params * @param string $expected The expected DOT code.