You are here

public function GeocoderTest::testConfigForm in Geocoder 8.2

Same name and namespace in other branches
  1. 8.3 src/Tests/GeocoderTest.php \Drupal\geocoder\Tests\GeocoderTest::testConfigForm()

Throws

\Exception

File

src/Tests/GeocoderTest.php, line 68

Class

GeocoderTest
Tests for the Geocoder module.

Namespace

Drupal\geocoder\Tests

Code

public function testConfigForm() {

  // Test form structure.
  $this
    ->drupalLogin($this->user);
  $this
    ->drupalGet('admin/config/system/geocoder');
  $this
    ->assertResponse(200);
  $config = $this
    ->config('geocoder.settings');
  $this
    ->assertFieldByName('cache', $config
    ->get('cache'));
  $this
    ->drupalPostForm(NULL, [
    'cache' => FALSE,
  ], t('Save configuration'));
  $this
    ->drupalGet('admin/config/system/geocoder');
  $this
    ->assertResponse(200);
  $this
    ->assertFieldByName('cache', FALSE);
}