Skip to content

Commit

Permalink
Update GraphFormatterTest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-mashin authored Feb 26, 2024
1 parent 47d8ae1 commit 0808f8f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/phpunit/Unit/Graph/GraphFormatterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'] );
Expand Down Expand Up @@ -152,7 +152,7 @@ public function provideCanConstruct(): array {
}

/**
* @covers GraphFormatter::__construct()
* @covers ::__construct()
* @dataProvider provideCanConstruct
* @param array $params
* @return void
Expand Down Expand Up @@ -182,17 +182,17 @@ public function provideGetWordWrappedText(): array {
}

/**
* @covers GraphFormatter::getWordWrappedText()
* @covers ::getWordWrappedText()
* @dataProvider provideGetWordWrappedText
* @param string $unwrapped
* @param string $wrapped
* @return void
*/
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 ) );
}
Expand All @@ -209,7 +209,7 @@ public function provideGetGraphLegend(): array {
}

/**
* @covers GraphFormatter::getGraphLegend()
* @covers ::getGraphLegend()
* @dataProvider provideGetGraphLegend
* @param array $params
* @param string $expected The expected legend.
Expand All @@ -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.
Expand Down

0 comments on commit 0808f8f

Please sign in to comment.