public function testFilterRegexListMatch() { $resource = new DirectoryResource($this->directory, '/\\.(foo|xml)$/'); touch($this->directory . '/new.xml', time() + 20); $this->assertFalse($resource->isFresh(time() + 10), '->isFresh() returns false if an new file matching the filter regex is created '); }
/** * Constructor. * * @param string $resource The file path to the resource * @param string|null $pattern A pattern to restrict monitored files * @param array $excludedFilesPaths */ public function __construct($resource, $pattern = null, $excludedFilesPaths = []) { $this->excludedFilesPaths = $excludedFilesPaths; parent::__construct($resource, $pattern); }