$description=$this->t('A user-defined date format. See the <a href="@url">PHP manual</a> for available options.',array('@url'=>'http://php.net/manual/function.date.php'));
$format=$this->t('Displayed as %date_format',array('%date_format'=>\Drupal::service('date')->format(REQUEST_TIME,'custom',$value)));
$format=$this->t('Displayed as %date_format',array('%date_format'=>\Drupal::service('date.formatter')->format(REQUEST_TIME,'custom',$value)));
$this->assertRaw(t('You cannot send more than %number messages in @interval. Try again later.',array('%number'=>$flood_limit,'@interval'=>\Drupal::service('date')->formatInterval(\Drupal::config('contact.settings')->get('flood.interval')))),'Normal user denied access to flooded contact form.');
$this->assertRaw(t('You cannot send more than %number messages in @interval. Try again later.',array('%number'=>$flood_limit,'@interval'=>\Drupal::service('date.formatter')->formatInterval(\Drupal::config('contact.settings')->get('flood.interval')))),'Normal user denied access to flooded contact form.');
// Test that the admin user can still access the contact form even though
@@ -212,7 +212,7 @@ function testSiteWideContact() {
// Submit contact form one over limit.
$this->drupalGet('contact');
$this->assertResponse(403);
$this->assertRaw(t('You cannot send more than %number messages in @interval. Try again later.',array('%number'=>\Drupal::config('contact.settings')->get('flood.limit'),'@interval'=>\Drupal::service('date')->formatInterval(600))));
$this->assertRaw(t('You cannot send more than %number messages in @interval. Try again later.',array('%number'=>\Drupal::config('contact.settings')->get('flood.limit'),'@interval'=>\Drupal::service('date.formatter')->formatInterval(600))));