/** * Find all source files, currently only PHP */ public function get_source_files() { $found = array(); foreach ($this->src as $dir) { foreach (LocoAdmin::find_php($dir) as $path) { $found[] = $path; } } return $found; }
public function testFindPhp() { $files = LocoAdmin::find_php(WP_CONTENT_DIR . '/themes/twentyfourteen'); $this->assertInternalType('array', $files); $this->assertContains(WP_CONTENT_DIR . '/themes/twentyfourteen/functions.php', $files); }