public function testFindsTasks() { $files = PlowFileLocator::find_all_tasks($this->plow_path); $match = array("Plowfile.php", "test.plow", "test2.plow", "test3.task"); $this->assertEquals($match, array_map(function ($t) { return basename($t); }, $files)); }
/** * Loads all tasks from current structure and other locations set with add_task_location * */ public function find_tasks() { $out = array(); foreach ($this->task_locations as $loc) { $out = array_merge($out, PlowFileLocator::find_all_tasks($loc)); } return $out; }