Verified Commit 76fc11d3 authored by Jess's avatar Jess
Browse files

Issue #3389286 by quietone: Fix spelling of words only misspelled in tests, part 2

parent ff567110
Loading
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ ajaxing
akiko
allwords
alphadecimal
alterjs
alternatif
amet
amphibius
@@ -130,8 +129,6 @@ bodyvalue
boing
bomofo
bonacieux
boskoop
boskop
bovigo
breezer
brion
@@ -344,7 +341,6 @@ drivertext
dropbutton
dropbuttons
drudbal
drup
drupalci
drupaldatetime
drupaldevdays
@@ -369,7 +365,6 @@ drush
drépal
détruire
editables
editunblock
eerste
egulias
eins
@@ -439,7 +434,6 @@ fieldsets
filelist
filemime
filesort
filestorage
filesystems
filetransfer
filevalidationerror
@@ -456,7 +450,6 @@ fooalert
foobarbaz
foobargorilla
foofoo
foos
formattable
formvalidation
fouc
@@ -753,7 +746,6 @@ negotiatiors
newcol
newfieldinitial
newnode
newstr
newterm
newwin
nids
@@ -918,8 +910,6 @@ presetname
pretransaction
preuninstall
processlist
projecta
projectb
proname
prophesize
prophesized
@@ -1001,7 +991,6 @@ revlog
revpub
ribisi
ritchie
rolename
roly
routable
routeable
@@ -1062,7 +1051,6 @@ somemodule
someschema
somethinggeneric
sortablejs
sourcedir
sourceediting
spacebar
spagna
@@ -1165,7 +1153,6 @@ tagstack
tagwords
takeshita
tappable
targetdir
tarz
taskless
tatou
+4 −4
Original line number Diff line number Diff line
@@ -46,14 +46,14 @@ public function testSearchTextProcessorUnicode() {
        // \Drupal\search\SearchTextProcessorInterface::analyze().
        $start = 0;
        while ($start < mb_strlen($string)) {
          $newstr = mb_substr($string, $start, 30);
          $new_string = mb_substr($string, $start, 30);
          // Special case: leading zeros are removed from numeric strings,
          // and there's one string in this file that is numbers starting with
          // zero, so prepend a 1 on that string.
          if (preg_match('/^[0-9]+$/', $newstr)) {
            $newstr = '1' . $newstr;
          if (preg_match('/^[0-9]+$/', $new_string)) {
            $new_string = '1' . $new_string;
          }
          $strings[] = $newstr;
          $strings[] = $new_string;
          $start += 30;
        }
      }
+3 −3
Original line number Diff line number Diff line
@@ -251,9 +251,9 @@ function common_test_page_attachments_alter(array &$page) {
 */
function common_test_js_alter(&$javascript, AttachedAssetsInterface $assets, LanguageInterface $language) {
  // Attach alter.js above tableselect.js.
  $alterjs = \Drupal::service('extension.list.module')->getPath('common_test') . '/alter.js';
  if (array_key_exists($alterjs, $javascript) && array_key_exists('core/misc/tableselect.js', $javascript)) {
    $javascript[$alterjs]['weight'] = $javascript['core/misc/tableselect.js']['weight'] - 1;
  $alter_js = \Drupal::service('extension.list.module')->getPath('common_test') . '/alter.js';
  if (array_key_exists($alter_js, $javascript) && array_key_exists('core/misc/tableselect.js', $javascript)) {
    $javascript[$alter_js]['weight'] = $javascript['core/misc/tableselect.js']['weight'] - 1;
  }
}

+6 −6
Original line number Diff line number Diff line
@@ -79,23 +79,23 @@ public function testJail() {

    // This convoluted piece of code is here because our testing framework does
    // not support expecting exceptions.
    $gotit = FALSE;
    $got_it = FALSE;
    try {
      $this->testConnection->copyDirectory($source, sys_get_temp_dir());
    }
    catch (FileTransferException $e) {
      $gotit = TRUE;
      $got_it = TRUE;
    }
    $this->assertTrue($gotit, 'Was not able to copy a directory outside of the jailed area.');
    $this->assertTrue($got_it, 'Was not able to copy a directory outside of the jailed area.');

    $gotit = TRUE;
    $got_it = TRUE;
    try {
      $this->testConnection->copyDirectory($source, $this->root . '/' . PublicStream::basePath());
    }
    catch (FileTransferException $e) {
      $gotit = FALSE;
      $got_it = FALSE;
    }
    $this->assertTrue($gotit, 'Was able to copy a directory inside of the jailed area');
    $this->assertTrue($got_it, 'Was able to copy a directory inside of the jailed area');
  }

}
+8 −8
Original line number Diff line number Diff line
@@ -23,15 +23,15 @@ public function testFileRetrieving() {
    // Test 404 handling by trying to fetch a randomly named file.
    /** @var \Drupal\Core\File\FileSystemInterface $file_system */
    $file_system = \Drupal::service('file_system');
    $file_system->mkdir($sourcedir = 'public://' . $this->randomMachineName());
    $file_system->mkdir($source_dir = 'public://' . $this->randomMachineName());
    // cSpell:disable-next-line
    $filename = 'Файл для тестирования ' . $this->randomMachineName();
    $url = \Drupal::service('file_url_generator')->generateAbsoluteString($sourcedir . '/' . $filename);
    $url = \Drupal::service('file_url_generator')->generateAbsoluteString($source_dir . '/' . $filename);
    $retrieved_file = system_retrieve_file($url);
    $this->assertFalse($retrieved_file, 'Non-existent file not fetched.');

    // Actually create that file, download it via HTTP and test the returned path.
    file_put_contents($sourcedir . '/' . $filename, 'testing');
    file_put_contents($source_dir . '/' . $filename, 'testing');
    $retrieved_file = system_retrieve_file($url);

    // URLs could not contains characters outside the ASCII set so $filename
@@ -46,15 +46,15 @@ public function testFileRetrieving() {
    $file_system->delete($retrieved_file);

    // Test downloading file to a different location.
    $file_system->mkdir($targetdir = 'temporary://' . $this->randomMachineName());
    $retrieved_file = system_retrieve_file($url, $targetdir);
    $this->assertEquals("{$targetdir}/{$encoded_filename}", $retrieved_file, 'Sane path for downloaded file returned (temporary:// scheme).');
    $file_system->mkdir($target_dir = 'temporary://' . $this->randomMachineName());
    $retrieved_file = system_retrieve_file($url, $target_dir);
    $this->assertEquals("{$target_dir}/{$encoded_filename}", $retrieved_file, 'Sane path for downloaded file returned (temporary:// scheme).');
    $this->assertFileExists($retrieved_file);
    $this->assertEquals(7, filesize($retrieved_file), 'File size of downloaded file is correct (temporary:// scheme).');
    $file_system->delete($retrieved_file);

    $file_system->deleteRecursive($sourcedir);
    $file_system->deleteRecursive($targetdir);
    $file_system->deleteRecursive($source_dir);
    $file_system->deleteRecursive($target_dir);
  }

}
Loading