コード例 #1
0
 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 ');
 }
コード例 #2
0
 /**
  * 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);
 }