|
|
|
|
@ -28,36 +28,6 @@ class IslandoraSettingsFormTest extends IslandoraFunctionalTestBase {
|
|
|
|
|
$this->drupalLogin($account); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Test Gemini URL validation. |
|
|
|
|
*/ |
|
|
|
|
public function testGeminiUri() { |
|
|
|
|
$this->drupalGet('/admin/config/islandora/core'); |
|
|
|
|
$this->assertSession()->statusCodeEquals(200); |
|
|
|
|
$this->assertSession()->pageTextContains("Gemini URL"); |
|
|
|
|
$this->assertSession()->fieldValueEquals('edit-gemini-url', ''); |
|
|
|
|
|
|
|
|
|
$this->drupalPostForm('admin/config/islandora/core', ['edit-gemini-url' => 'not_a_url'], $this->t('Save configuration')); |
|
|
|
|
$this->assertSession()->pageTextContainsOnce("Cannot parse URL not_a_url"); |
|
|
|
|
|
|
|
|
|
$this->drupalPostForm('admin/config/islandora/core', ['edit-gemini-url' => 'http://whaturl.bob'], $this->t('Save configuration')); |
|
|
|
|
$this->assertSession()->pageTextContainsOnce("Cannot connect to URL http://whaturl.bob"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Test block on choosing Pseudo field bundles without a Gemini URL. |
|
|
|
|
*/ |
|
|
|
|
public function testPseudoFieldBundles() { |
|
|
|
|
$this->drupalGet('/admin/config/islandora/core'); |
|
|
|
|
$this->assertSession()->statusCodeEquals(200); |
|
|
|
|
|
|
|
|
|
$this->drupalPostForm('admin/config/islandora/core', [ |
|
|
|
|
'gemini_pseudo_bundles[test_type:node]' => TRUE, |
|
|
|
|
], $this->t('Save configuration')); |
|
|
|
|
$this->assertSession()->pageTextContainsOnce("Must enter Gemini URL before selecting bundles to display a pseudo field on."); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Test form validation for JWT expiry. |
|
|
|
|
*/ |
|
|
|
|
|