/**
  * Creates Xslt_transformer injecting dependencies.
  * Input params must be the same as in the __construct
  * 
  * @access public
  * @static
  * 
  * @param $file_path
  *   The path to the file to convert.
  * 
  * @return Xslt_transformer
  */
 public static function build($file_path)
 {
     $xslt_transformer = new Xslt_transformer($file_path);
     $CI = get_instance();
     $xslt_transformer->set_enketo_xslt_lib_location($CI->config->item('aw_enketo_xslt_lib'));
     return $xslt_transformer;
 }
 /**
  * Converting a valid file.
  */
 public function test_xslt_transformer_valid()
 {
     $xslt_transformer = new Xslt_transformer('tests/test_resources/surveys/super_simple_survey.xml');
     $xslt_transformer->set_enketo_xslt_lib_location('./application/third_party/enketo-xslt/');
     $result = $xslt_transformer->get_transform_result_sxe();
     $errors = $xslt_transformer->get_errors();
     // Every error group should be empty.
     foreach ($errors as $error_group) {
         $this->assertEmpty($error_group);
     }
     $this->assertInstanceOf('SimpleXMLElement', $result);
 }