public function CtoolsExportCrudTestCase::testCrudExportNew in Chaos Tool Suite (ctools) 7
Tests CRUD operation: New.
File
- tests/
ctools_export_test/ ctools_export.test, line 89
Class
- CtoolsExportCrudTestCase
- Tests for the CTools export system.
Code
public function testCrudExportNew() {
// Default exportable with defualt values.
$new_export = ctools_export_crud_new('ctools_export_test');
$expected_export = new stdClass();
$expected_export->machine = '';
$expected_export->title = '';
$expected_export->number = 0;
$expected_export->data = NULL;
$expected_export->export_type = NULL;
$expected_export->type = 'Local';
$this
->assertEqual($expected_export, $new_export, 'An exportable with default values is created.');
// Default exportable without default values.
$new_export = ctools_export_crud_new('ctools_export_test', FALSE);
$expected_export = new stdClass();
$expected_export->machine = '';
$expected_export->title = '';
$expected_export->number = NULL;
$expected_export->data = NULL;
$this
->assertEqual($expected_export, $new_export, 'An exportable without default values has been created.');
}