Esempio n. 1
0
 /**
  * Add new callback test to suit
  *
  * @param string $name
  * @param mixed|callable|filepath $callback
  * @param null $type
  * @return Test
  */
 public function addTest($name, $callback, $type = null)
 {
     if (is_string($callback) && (is_file(__DIR__ . $callback) || is_file($callback))) {
         $callback = Check::file(basename($callback), dirname($callback));
     }
     // create new Test instance
     $test = new Test($name, $callback, $type);
     $test->enable($this->filter->isValid($test, $this));
     return $this->groups[$this->getCurrentGroupName()][] = $test;
 }
Esempio n. 2
0
 /**
  * 
  * @param mixed $file name file or array of names of files
  * @param string $folder of files
  * @param mixed $extension of file or array with several extensions
  * @return string|array
  */
 protected function enqueueFiles($file, $folder, $extension = null)
 {
     $this->destroySecondaryTheme();
     $enqueue = Check::file($file, $folder, $extension);
     return $enqueue;
 }