You are here

function AsafUnitTests::testNeededFilesList in Asaf (ajax submit for any form) 7

Same name and namespace in other branches
  1. 8 tests/asaf.test \AsafUnitTests::testNeededFilesList()

File

tests/asaf.test, line 130

Class

AsafUnitTests

Code

function testNeededFilesList() {
  $asafPath = drupal_get_path('module', 'asaf');
  $list = asaf_get_needed_files_list(array(
    $asafPath . '/tests/asaf.test',
  ));
  $file = $asafPath . '/tests/asaf.test';
  $this
    ->assertTrue(array_search($file, $list) !== FALSE, t('Attach a simple file (repeater mode)'));
  $list = asaf_get_needed_files_list(array(
    'user',
  ));
  $condition = array_search('modules/user/user.module', $list) !== FALSE && array_search('modules/user/user.tokens.inc', $list) !== FALSE && array_search('modules/user/user.admin.inc', $list) !== FALSE && array_search('modules/user/user.pages.inc', $list) !== FALSE && count($list) == 4;
  $this
    ->assertTrue($condition, t('Detecting module includes'));
}