Skip to content

Commit d3dd538

Browse files
committed
Merge remote-tracking branch 'ogresCE/MAGETWO-38028-Travis-CI-Failure' into PR_Branch
2 parents 4be06ee + 55d103c commit d3dd538

File tree

6 files changed

+34
-36
lines changed

6 files changed

+34
-36
lines changed

dev/tests/integration/testsuite/Magento/Setup/Console/Command/DependenciesShowFrameworkCommandTest.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,15 @@ public function testExecute()
4040
['--directory' => __DIR__ . '/_files/root', '--output' => __DIR__ . '/_files/output/framework.csv']
4141
);
4242
$this->assertEquals('Report successfully processed.' . PHP_EOL, $this->commandTester->getDisplay());
43-
$this->assertFileEquals(
44-
__DIR__ . '/_files/expected/framework.csv',
45-
__DIR__ . '/_files/output/framework.csv'
43+
$fileContents = file_get_contents(__DIR__ . '/_files/output/framework.csv');
44+
$this->assertContains(
45+
'"Dependencies of framework:","Total number"' . PHP_EOL . '"","2"' . PHP_EOL,
46+
$fileContents
4647
);
48+
$this->assertContains('"Dependencies for each module:",""' . PHP_EOL, $fileContents);
49+
$this->assertContains('"Magento\A","1"' . PHP_EOL . '" -- Magento\Framework","1"' . PHP_EOL, $fileContents);
50+
$this->assertContains('"Magento\B","1"' . PHP_EOL . '" -- Magento\Framework","1"' . PHP_EOL, $fileContents);
51+
4752
}
4853

4954
public function testExecuteInvalidDirectory()

dev/tests/integration/testsuite/Magento/Setup/Console/Command/DependenciesShowModulesCircularCommandTest.php

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,19 @@ public function testExecute()
3838
['--directory' => __DIR__ . '/_files/root', '--output' => __DIR__ . '/_files/output/circular.csv']
3939
);
4040
$this->assertEquals('Report successfully processed.' . PHP_EOL, $this->commandTester->getDisplay());
41-
$this->assertFileEquals(
42-
__DIR__ . '/_files/expected/circular.csv',
43-
__DIR__ . '/_files/output/circular.csv'
41+
$fileContents = file_get_contents(__DIR__ . '/_files/output/circular.csv');
42+
$this->assertContains(
43+
'"Circular dependencies:","Total number of chains"' . PHP_EOL . '"","2"' . PHP_EOL,
44+
$fileContents
45+
);
46+
$this->assertContains('"Circular dependencies for each module:",""' . PHP_EOL, $fileContents);
47+
$this->assertContains(
48+
'"magento/module-a","1"' . PHP_EOL . '"magento/module-a->magento/module-b->magento/module-a"' . PHP_EOL,
49+
$fileContents
50+
);
51+
$this->assertContains(
52+
'"magento/module-b","1"' . PHP_EOL . '"magento/module-b->magento/module-a->magento/module-b"' . PHP_EOL,
53+
$fileContents
4454
);
4555
}
4656

dev/tests/integration/testsuite/Magento/Setup/Console/Command/DependenciesShowModulesCommandTest.php

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,19 @@ public function testExecute()
3838
['--directory' => __DIR__ . '/_files/root', '--output' => __DIR__ . '/_files/output/modules.csv']
3939
);
4040
$this->assertEquals('Report successfully processed.' . PHP_EOL, $this->commandTester->getDisplay());
41-
$this->assertFileEquals(
42-
__DIR__ . '/_files/expected/modules.csv',
43-
__DIR__ . '/_files/output/modules.csv'
41+
$fileContents = file_get_contents(__DIR__ . '/_files/output/modules.csv');
42+
$this->assertContains(
43+
'"","All","Hard","Soft"' . PHP_EOL . '"Total number of dependencies","2","2","0"' . PHP_EOL,
44+
$fileContents
45+
);
46+
$this->assertContains('"Dependencies for each module:","All","Hard","Soft"'. PHP_EOL, $fileContents);
47+
$this->assertContains(
48+
'"magento/module-a","1","1","0"' . PHP_EOL . '" -- magento/module-b","","1","0"' . PHP_EOL,
49+
$fileContents
50+
);
51+
$this->assertContains(
52+
'"magento/module-b","1","1","0"' . PHP_EOL . '" -- magento/module-a","","1","0"' . PHP_EOL,
53+
$fileContents
4454
);
4555
}
4656

dev/tests/integration/testsuite/Magento/Setup/Console/Command/_files/expected/circular.csv

Lines changed: 0 additions & 9 deletions
This file was deleted.

dev/tests/integration/testsuite/Magento/Setup/Console/Command/_files/expected/framework.csv

Lines changed: 0 additions & 9 deletions
This file was deleted.

dev/tests/integration/testsuite/Magento/Setup/Console/Command/_files/expected/modules.csv

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)