Skip to content
Snippets Groups Projects
Commit 2e098b4c authored by Yash Rode's avatar Yash Rode Committed by Adam G-H
Browse files

Issue #3355094 by yash.rode: Remove node_modules/exclude.txt from fake_site fixture

parent 4c15e96d
No related branches found
No related tags found
No related merge requests found
This file should never be staged.
This file should never be staged.
...@@ -26,16 +26,20 @@ class NodeModulesExcluderTest extends PackageManagerKernelTestBase { ...@@ -26,16 +26,20 @@ class NodeModulesExcluderTest extends PackageManagerKernelTestBase {
$active_dir = $this->container->get(PathLocator::class) $active_dir = $this->container->get(PathLocator::class)
->getProjectRoot(); ->getProjectRoot();
$excluded = [
"core/node_modules/exclude.txt",
'modules/example/node_modules/exclude.txt',
];
foreach ($excluded as $path) {
mkdir(dirname("$active_dir/$path"), 0777, TRUE);
file_put_contents("$active_dir/$path", "This file should never be staged.");
}
$stage = $this->createStage(); $stage = $this->createStage();
$stage->create(); $stage->create();
$stage->require(['ext-json:*']); $stage->require(['ext-json:*']);
$stage_dir = $stage->getStageDirectory(); $stage_dir = $stage->getStageDirectory();
$excluded = [
"core/node_modules/exclude.txt",
'modules/example/node_modules/exclude.txt',
];
foreach ($excluded as $path) { foreach ($excluded as $path) {
$this->assertFileExists("$active_dir/$path"); $this->assertFileExists("$active_dir/$path");
$this->assertFileDoesNotExist("$stage_dir/$path"); $this->assertFileDoesNotExist("$stage_dir/$path");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment