File
-
./
exif_functionaltests.php, line 203
Class
- ExifFunctionalTestCase
- Base class for functional tests for this module.
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.', 'form has been correctly submitted', 'Exif');
$this->drupalGet("node/{$node->nid}");
$this->assertResponse(200, t('photography node edition is complete.'), 'Exif');
}