Example #1
0
 /**
  * Tests the UI of the plugin.
  */
 protected function testMicrosoftUi()
 {
     $this->loginAsAdmin();
     $edit = ['settings[client_id]' => 'wrong client_id', 'settings[client_secret]' => 'wrong client_secret'];
     $this->drupalPostForm('admin/config/regional/tmgmt_translator/manage/' . $this->translator->id(), $edit, t('Save'));
     $this->assertText(t('The "Client ID", the "Client secret" or both are not correct.'));
     $edit = ['settings[client_id]' => 'correct client_id', 'settings[client_secret]' => 'correct client_secret'];
     $this->drupalPostForm('admin/config/regional/tmgmt_translator/manage/' . $this->translator->id(), $edit, t('Save'));
     $this->assertText(t('@label configuration has been updated.', ['@label' => $this->translator->label()]));
 }