comparison core/modules/locale/tests/src/Functional/LocaleUpdateCronTest.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents c75dbcec494b
children
comparison
equal deleted inserted replaced
4:a9cd425dd02b 5:12f9dff5fda9
1 <?php 1 <?php
2 2
3 namespace Drupal\Tests\locale\Functional; 3 namespace Drupal\Tests\locale\Functional;
4 4
5 use Drupal\Core\Database\Database;
5 use Drupal\Tests\Traits\Core\CronRunTrait; 6 use Drupal\Tests\Traits\Core\CronRunTrait;
6 7
7 /** 8 /**
8 * Tests for using cron to update project interface translations. 9 * Tests for using cron to update project interface translations.
9 * 10 *
49 $contrib_module_two_uri = 'public://local/contrib_module_two-8.x-2.0-beta4.de._po'; 50 $contrib_module_two_uri = 'public://local/contrib_module_two-8.x-2.0-beta4.de._po';
50 touch(\Drupal::service('file_system')->realpath($contrib_module_two_uri), REQUEST_TIME); 51 touch(\Drupal::service('file_system')->realpath($contrib_module_two_uri), REQUEST_TIME);
51 52
52 // Prepare for test: Simulate that the file has not been checked for a long 53 // Prepare for test: Simulate that the file has not been checked for a long
53 // time. Set the last_check timestamp to zero. 54 // time. Set the last_check timestamp to zero.
54 $query = db_update('locale_file'); 55 $query = Database::getConnection()->update('locale_file');
55 $query->fields(['last_checked' => 0]); 56 $query->fields(['last_checked' => 0]);
56 $query->condition('project', 'contrib_module_two'); 57 $query->condition('project', 'contrib_module_two');
57 $query->condition('langcode', 'de'); 58 $query->condition('langcode', 'de');
58 $query->execute(); 59 $query->execute();
59 60