diff --git a/core/tests/Drupal/KernelTests/Core/File/ScanDirectoryTest.php b/core/tests/Drupal/KernelTests/Core/File/ScanDirectoryTest.php index 47c7d2c..e46073c 100644 --- a/core/tests/Drupal/KernelTests/Core/File/ScanDirectoryTest.php +++ b/core/tests/Drupal/KernelTests/Core/File/ScanDirectoryTest.php @@ -145,22 +145,22 @@ function testOptionMinDepth() { /** * Tests file_scan_directory() obeys 'file_scan_ignore_directories' setting. */ - function testIgnoreDirectories() { + public function testIgnoreDirectories() { $files = file_scan_directory('core/modules/system/tests/fixtures/IgnoreDirectories', '/\.txt$/'); - $this->assertEqual(2, count($files), '2 text files found when not ignoring directories.'); + $this->assertCount(2, $files, '2 text files found when not ignoring directories.'); - $this->settingsSet('file_scan_ignore_directories', ['frontend_framework']); + $this->setSetting('file_scan_ignore_directories', ['frontend_framework']); $files = file_scan_directory('core/modules/system/tests/fixtures/IgnoreDirectories', '/\.txt$/'); - $this->assertEqual(1, count($files), '1 text files found when ignoring directories called "frontend_framework".'); + $this->assertCount(1, $files, '1 text files found when ignoring directories called "frontend_framework".'); // Ensure that the directories in file_scan_ignore_directories are escaped // using preg_quote. - $this->settingsSet('file_scan_ignore_directories', ['frontend.*']); + $this->setSetting('file_scan_ignore_directories', ['frontend.*']); $files = file_scan_directory('core/modules/system/tests/fixtures/IgnoreDirectories', '/\.txt$/'); - $this->assertEqual(2, count($files), '2 text files found when ignoring a directory that is not there.'); + $this->assertCount(2, $files, '2 text files found when ignoring a directory that is not there.'); $files = file_scan_directory('core/modules/system/tests/fixtures/IgnoreDirectories', '/\.txt$/', ['nomask' => '/^something_thing_else$/']); - $this->assertEqual(2, count($files), '2 text files found when an "nomasl" option passed in.'); + $this->assertCount(2, $files, '2 text files found when an "nomask" option passed in.'); } }