function FlexsliderTestCase::testOptionSet in Flex Slider 7
File
- ./
flexslider.test, line 51 - Test cases for Flex Slider
Class
- FlexsliderTestCase
- @file Test cases for Flex Slider
Code
function testOptionSet() {
// Login with admin user
$this
->drupalLogin($this->admin_user);
// ------------ Test Option Set Add ------------ //
// Load create form
$this
->drupalGet('admin/config/media/flexslider/add');
$this
->assertResponse(200, t('Administrative user can reach the "Add" form.'));
// Save new optionset
$optionset = array();
$optionset['title'] = 'testset';
$optionset['name'] = 'testset';
$this
->drupalPost('admin/config/media/flexslider/add', $optionset, t('Create new option set'));
$this
->assertResponse(200);
$this
->assertText('Option set testset was created.', t('Successfully saved the new optionset "testset"'));
// Attempt to save option set of the same name again
// @todo
// ------------ Test Option Set Edit ------------ //
// Attempt to save each option value
$options = _flexslider_test_options();
foreach ($options['valid'] as $testset) {
$this
->drupalPost('admin/config/media/flexslider/edit/default', $testset, t('Save option set'));
$thid
->assertResponse(200);
// Test saved values
// @todo
}
// ------------ Test Option Set Delete ------------ //
// Attempt to delete an option set that exists
// Attemp to delete an option set that doesn't exist
}