Skip to content

Commit 2985c4e

Browse files
author
Иван Сабиров
committed
Внесены исправления в тесты
1 parent f949a69 commit 2985c4e

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

tests/GenDiffTest.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use PHPUnit\Framework\TestCase;
66

7-
use function GenDiff\Generator\generate;
7+
use function GenDiff\Renderer\render;
88

99
class GenDiffTests extends TestCase
1010
{
@@ -20,10 +20,10 @@ public function testPrettyResult()
2020
$path8 = "tests/fixtures/nestedAfter.yaml";
2121
$expected1 = file_get_contents("tests/fixtures/expected/prettyFlatResult.txt");
2222
$expected2 = file_get_contents("tests/fixtures/expected/prettyNestedResult.txt");
23-
$this->assertEquals($expected1, generate($path1, $path2, "pretty"));
24-
$this->assertEquals($expected1, generate($path3, $path4, "pretty"));
25-
$this->assertEquals($expected2, generate($path5, $path6, "pretty"));
26-
$this->assertEquals($expected2, generate($path7, $path8, "pretty"));
23+
$this->assertEquals($expected1, render($path1, $path2, "pretty"));
24+
$this->assertEquals($expected1, render($path3, $path4, "pretty"));
25+
$this->assertEquals($expected2, render($path5, $path6, "pretty"));
26+
$this->assertEquals($expected2, render($path7, $path8, "pretty"));
2727
}
2828
public function testPlainResult()
2929
{
@@ -37,10 +37,10 @@ public function testPlainResult()
3737
$path8 = "tests/fixtures/nestedAfter.yaml";
3838
$expected1 = file_get_contents("tests/fixtures/expected/plainFlatResult.txt");
3939
$expected2 = file_get_contents("tests/fixtures/expected/plainNestedResult.txt");
40-
$this->assertEquals($expected1, generate($path1, $path2, "plain"));
41-
$this->assertEquals($expected1, generate($path3, $path4, "plain"));
42-
$this->assertEquals($expected2, generate($path5, $path6, "plain"));
43-
$this->assertEquals($expected2, generate($path7, $path8, "plain"));
40+
$this->assertEquals($expected1, render($path1, $path2, "plain"));
41+
$this->assertEquals($expected1, render($path3, $path4, "plain"));
42+
$this->assertEquals($expected2, render($path5, $path6, "plain"));
43+
$this->assertEquals($expected2, render($path7, $path8, "plain"));
4444
}
4545
public function testJsonResult()
4646
{
@@ -54,9 +54,9 @@ public function testJsonResult()
5454
$path8 = "tests/fixtures/nestedAfter.yaml";
5555
$expected1 = file_get_contents("tests/fixtures/expected/jsonFlatResult.txt");
5656
$expected2 = file_get_contents("tests/fixtures/expected/jsonNestedResult.txt");
57-
$this->assertEquals($expected1, generate($path1, $path2, "json"));
58-
$this->assertEquals($expected1, generate($path3, $path4, "json"));
59-
$this->assertEquals($expected2, generate($path5, $path6, "json"));
60-
$this->assertEquals($expected2, generate($path7, $path8, "json"));
57+
$this->assertEquals($expected1, render($path1, $path2, "json"));
58+
$this->assertEquals($expected1, render($path3, $path4, "json"));
59+
$this->assertEquals($expected2, render($path5, $path6, "json"));
60+
$this->assertEquals($expected2, render($path7, $path8, "json"));
6161
}
6262
}

0 commit comments

Comments
 (0)