Ejemplo n.º 1
0
 /**
  * Utility function to build mock object.
  *
  * @param  behat_config_util $behatconfigutil
  * @param bool $notheme
  * @return mixed
  */
 private function get_behat_config_util($behatconfigutil, $notheme = false)
 {
     // Create a map of arguments to return values.
     $map = array(array('withfeatures', __DIR__ . '/fixtures/theme/withfeatures'), array('nofeatures', __DIR__ . '/fixtures/theme/nofeatures'));
     // List of themes is const for test.
     if ($notheme) {
         $themelist = array();
     } else {
         $themelist = array('withfeatures', 'nofeatures');
     }
     $behatconfigutil->expects($this->any())->method('get_list_of_themes')->will($this->returnValue($themelist));
     // Theme directory for testing.
     $behatconfigutil->expects($this->any())->method('get_theme_test_directory')->will($this->returnValueMap($map));
     return $behatconfigutil;
 }