You are here

public function ExifCustomTestCase::testSettings in EXIF Custom 7

Check the different admin pages.

File

tests/ExifCustomTestCase.test, line 28
Test all functionality of EXIF Custom

Class

ExifCustomTestCase
Test all functionality of EXIF Custom.

Code

public function testSettings() {

  // Load the first admin page.
  $this
    ->drupalGet('admin/config/media/exif_custom');
  $this
    ->assertResponse(200);
  $this
    ->assertText('No mappings have been created yet.');

  // The "New mapping" admin page.
  $this
    ->drupalGet('admin/config/media/exif_custom/add');
  $this
    ->assertResponse(200);
  $this
    ->assertFieldByName('name');
  $this
    ->assertFieldByName('files[example_file]');
  $this
    ->assertFieldByName('op', 'Save');

  // The settings page.
  $this
    ->drupalGet('admin/config/media/exif_custom/settings');
  $this
    ->assertResponse(200);
  $this
    ->assertText('No mappings have been created yet.');
  $this
    ->assertFieldByName('exif_custom_request_method', 'legacy');
  $this
    ->assertFieldByName('exif_custom_request_method', 'new');

  // The user settings page.
  $this
    ->drupalGet('admin/config/media/exif_custom/user');
  $this
    ->assertResponse(200);
  $this
    ->assertText('No mappings have been created yet.');
}