diff --git a/core/drupalci.yml b/core/drupalci.yml index ed02d43c63..d9a9e07939 100644 --- a/core/drupalci.yml +++ b/core/drupalci.yml @@ -19,41 +19,8 @@ build: # halt-on-fail can be set on the run_tests tasks in order to fail fast. # suppress-deprecations is false in order to be alerted to usages of # deprecated code. - run_tests.phpunit: - types: 'PHPUnit-Unit' - testgroups: '--all' - suppress-deprecations: false - halt-on-fail: false - run_tests.kernel: - types: 'PHPUnit-Kernel' - testgroups: '--all' - suppress-deprecations: false - halt-on-fail: false - run_tests.simpletest: - types: 'Simpletest' - testgroups: '--all' - suppress-deprecations: false - halt-on-fail: false run_tests.build: types: 'PHPUnit-Build' testgroups: '--all' suppress-deprecations: false halt-on-fail: false - run_tests.functional: - types: 'PHPUnit-Functional' - testgroups: '--all' - suppress-deprecations: false - halt-on-fail: false - run_tests.javascript: - concurrency: 15 - types: 'PHPUnit-FunctionalJavascript' - testgroups: '--all' - suppress-deprecations: false - halt-on-fail: false - # Run nightwatch testing. - # @see https://www.drupal.org/project/drupal/issues/2869825 - nightwatchjs: -# container_command.drupal_project_templates: -# commands: -# - "sudo -u www-data ${SOURCE_DIR}/core/tests/scripts/test_composer_project_templates.sh" -# halt-on-fail: true diff --git a/core/tests/Drupal/BuildTests/Framework/Tests/BuildTestTest.php b/core/tests/Drupal/BuildTests/Framework/Tests/BuildTestTest.php index 4e00e5ad19..3ded6d55ea 100644 --- a/core/tests/Drupal/BuildTests/Framework/Tests/BuildTestTest.php +++ b/core/tests/Drupal/BuildTests/Framework/Tests/BuildTestTest.php @@ -4,6 +4,7 @@ use Drupal\BuildTests\Framework\BuildTestBase; use org\bovigo\vfs\vfsStream; +use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Finder\Finder; /** @@ -56,8 +57,8 @@ public function testCopyCodebase() { * @covers ::copyCodebase */ public function testCopyCodebaseExclude() { - // Create a virtual file system containing only items that should be - // excluded. + // Create a virtual file system containing items that should be + // excluded. Exception being modules directory. vfsStream::setup('drupal', NULL, [ 'sites' => [ 'default' => [ @@ -65,6 +66,7 @@ public function testCopyCodebaseExclude() { 'a_file.txt' => 'some file.', ], 'settings.php' => ' ' [ 'simpletest_hash' => [ @@ -79,6 +81,15 @@ public function testCopyCodebaseExclude() { ], ], ], + 'modules' => [ + 'my_module' => [ + 'vendor' => [ + 'my_vendor' => [ + 'composer.json' => "{\n}" + ], + ], + ], + ], ]); // Mock BuildTestBase so that it thinks our VFS is the Drupal root. @@ -98,6 +109,13 @@ public function testCopyCodebaseExclude() { $full_path = $base->getWorkspaceDirectory() . '/' . $test_directory; $this->assertDirectoryExists($full_path); + + // Verify nested vendor directory was not excluded. Then remove it for next + // validation. + $this->assertFileExists($full_path . DIRECTORY_SEPARATOR . 'modules/my_module/vendor/my_vendor/composer.json'); + $file_system = new Filesystem(); + $file_system->remove($full_path . DIRECTORY_SEPARATOR . 'modules'); + // Use scandir() to determine if our target directory is empty. It should // only contain the system dot directories. $this->assertTrue(