public function testGetFiles() { // Ignore some files for better testing. $config = ['filter' => ['notNames' => ['version.php'], 'notPaths' => ['test']]]; $fs = new Filesystem(); $fs->dumpFile($this->pluginDir . '/.moodle-plugin-ci.yml', Yaml::dump($config)); $finder = new Finder(); $finder->name('*.php'); $plugin = new MoodlePlugin($this->pluginDir); $this->assertEquals([$this->pluginDir . '/lib.php'], $plugin->getFiles($finder)); }
/** * Get all files we want to add to code coverage. * * @return array */ private function getCoverageFiles() { $finder = Finder::create()->name('*.php')->notName('*_test.php')->notName('version.php')->notName('settings.php')->notPath('lang')->notPath('vendor'); $files = $this->plugin->getFiles($finder); return $this->removeDbFiles($this->plugin->directory . '/db', $files); }