You are here

public function ExifFunctionalTestCase::testCreatePhotoNodeWithoutImage in Exif 7

File

./exif_functionaltests.php, line 180

Class

ExifFunctionalTestCase

Code

public function testCreatePhotoNodeWithoutImage() {
  $settings = array(
    'type' => 'photo',
    'title' => $this
      ->randomName(32),
  );
  $node = $this
    ->drupalCreateNode($settings);
  $this
    ->assertNotNull($node, "node created", 'Exif');
  $this
    ->verbose('Node created: ' . var_export($node, TRUE));
  $this
    ->drupalGet("node/{$node->nid}/edit");
  $this
    ->assertResponse(200, t('User is allowed to edit the content.'), 'Exif');
  $this
    ->assertText(t("@title", array(
    '@title' => $settings['title'],
  )), "Found title in edit form", 'Exif');
  $this
    ->drupalPost(NULL, array(), t('Save'));
  $this
    ->assertResponse(200, t('trying to submit node.'), 'Exif');
  $this
    ->assertNoText("The content on this page has either been modified by another user, or you have already submitted modifications using this form. As a result, your changes cannot be saved.", t('form has been correctly submitted'), 'Exif');
  $noedit = array();
  $this
    ->drupalGet("node/{$node->nid}");
  $this
    ->assertResponse(200, t('photography node edition is complete.'), 'Exif');
}