diff --git a/core/modules/file/lib/Drupal/file/Tests/FileManagedTestBase.php b/core/modules/file/lib/Drupal/file/Tests/FileManagedTestBase.php index 616a829..b4c70c3 100644 --- a/core/modules/file/lib/Drupal/file/Tests/FileManagedTestBase.php +++ b/core/modules/file/lib/Drupal/file/Tests/FileManagedTestBase.php @@ -90,8 +90,7 @@ function assertFileHookCalled($hook, $expected_count = 1, $message = NULL) { } /** - * Check that two files have the same values for all fields other than the - * timestamp. + * Asserts that two files have the same values (except timestamp). * * @param \Drupal\file\FileInterface $before * File object to compare. @@ -109,7 +108,7 @@ function assertFileUnchanged(FileInterface $before, FileInterface $after) { } /** - * Check that two files are not the same by comparing the fid and filepath. + * Asserts that two files are not the same by comparing the fid and filepath. * * @param \Drupal\file\FileInterface $file1 * File object to compare. @@ -122,7 +121,7 @@ function assertDifferentFile(FileInterface $file1, FileInterface $file2) { } /** - * Check that two files are the same by comparing the fid and filepath. + * Asserts that two files are the same by comparing the fid and filepath. * * @param \Drupal\file\FileInterface $file1 * File object to compare. @@ -168,18 +167,19 @@ function createFile($filepath = NULL, $contents = NULL, $scheme = NULL) { } /** - * Create a file and return the URI of it. + * Creates a file and returns its URI. * - * @param $filepath + * @param string $filepath * Optional string specifying the file path. If none is provided then a * randomly named file will be created in the site's files directory. - * @param $contents + * @param string $contents * Optional contents to save into the file. If a NULL value is provided an * arbitrary string will be used. - * @param $scheme + * @param string $scheme * Optional string indicating the stream scheme to use. Drupal core includes * public, private, and temporary. The public wrapper is the default. - * @return + * + * @return string * File URI. */ function createUri($filepath = NULL, $contents = NULL, $scheme = NULL) { diff --git a/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php index 18b3ae8..f4738fa 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php @@ -70,7 +70,7 @@ * * @var array */ - private $stream_wrappers = array(); + private $streamWrappers = array(); /** * Overrides \Drupal\simpletest\UnitTestBase::__construct(). @@ -159,7 +159,7 @@ protected function tearDown() { // of this test leaks into the parent environment. Unlike all other global // state variables in Drupal, stream wrappers are a global state construct // of PHP core, which has to be maintained manually. - foreach ($this->stream_wrappers as $scheme) { + foreach ($this->streamWrappers as $scheme) { $this->unregisterStreamWrapper($scheme); } parent::tearDown(); @@ -374,10 +374,10 @@ protected function disableModules(array $modules) { * STREAM_WRAPPERS_LOCAL_NORMAL. */ protected function registerStreamWrapper($scheme, $class, $type = STREAM_WRAPPERS_LOCAL_NORMAL) { - if (isset($this->stream_wrappers[$scheme])) { + if (isset($this->streamWrappers[$scheme])) { $this->unregisterStreamWrapper($scheme); } - $this->stream_wrappers[$scheme] = $scheme; + $this->streamWrappers[$scheme] = $scheme; if (($type & STREAM_WRAPPERS_LOCAL) == STREAM_WRAPPERS_LOCAL) { stream_wrapper_register($scheme, $class); } @@ -404,7 +404,7 @@ protected function registerStreamWrapper($scheme, $class, $type = STREAM_WRAPPER */ protected function unregisterStreamWrapper($scheme) { stream_wrapper_unregister($scheme); - unset($this->stream_wrappers[$scheme]); + unset($this->streamWrappers[$scheme]); // @todo Revamp Drupal's stream wrapper API for D8. $wrappers = &drupal_static('file_get_stream_wrappers'); unset($wrappers[$scheme]); diff --git a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php index 3bb6e3f..dbf8440 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php @@ -968,7 +968,7 @@ protected function prepareEnvironment() { // - UnitTestBase operates in a completely empty environment. // - DrupalUnitTestBase supports and maintains stream wrappers in a custom // way. - // - WebTestBase re-initializes Drupal stream wrappers are installation. + // - WebTestBase re-initializes Drupal stream wrappers after installation. // The original stream wrappers are restored after the test run. // @see TestBase::tearDown() $wrappers = file_get_stream_wrappers();