Same name and namespace in other branches
  1. 5.0.x tests/src/Kernel/Form/SettingsFormTest.php \Drupal\Tests\advagg\Kernel\Form\SettingsFormTest::testLongTimes() 1 commentaire
  2. 8.x-4.x tests/src/Kernel/Form/SettingsFormTest.php \Drupal\Tests\advagg\Kernel\Form\SettingsFormTest::testLongTimes() 1 commentaire

Test the method getLongTimes.

Fichier

tests/src/Kernel/Form/SettingsFormTest.php, line 65

Classe

SettingsFormTest
Class for test <a href="/fr/work/drupal-api/advagg/src%21Form%21SettingsForm.php/class/SettingsForm/6.0.x" title="Configure advagg settings for this site." class="local">Drupal\advagg\Form\SettingsForm</a>.

Namespace

Drupal\Tests\advagg\Kernel\Form

Code

public function testLongTimes() {
    $longTimes = $this->settingsForm
        ->getLongTimes();
    $this->assertIsArray($longTimes);
    $this->assertTrue(in_array('2 days', $longTimes));
    $this->assertTrue(in_array('2 months', $longTimes));
}