You are here

public function PatternsImportTestCase::testImportFileFromFile in Patterns 7.2

Same name and namespace in other branches
  1. 7 tests/importing/importing.test \PatternsImportTestCase::testImportFileFromFile()

File

tests/importing/importing.test, line 52
Tests importing files.

Class

PatternsImportTestCase
@file Tests importing files.

Code

public function testImportFileFromFile() {
  $name = 'Test_Import_From_File';
  $destination = $destination = patterns_path_get_files_dir();

  // Fill the form.
  $edit = array();
  $edit['name'] = $name;
  $edit['files[pattern_uri]'] = $this->importing_tests_dir . 'importing.yaml';
  $edit['destination'] = $destination;

  // Post the form.
  $this
    ->drupalPost('admin/patterns/import/file', $edit, t('Import'));
  $this
    ->checkImportedFile($name, PATTERNS_FORMAT_YAML, $destination);
}