Пример #1
0
 static function __static()
 {
     self::$filter = Filters::noneOf([new UriMatchesFilter('#/(CVS|\\.svn|\\.git|\\.arch|\\.hg|_darcs|\\.bzr)/#'), new CollectionFilter()]);
 }
 public function noneOf()
 {
     $this->assertEquals(['./third.jpg', './sub/', './sub/IMG_6100.jpg', './sub/sec/', './sub/sec/lang.base.php', './sub/sec/__xp__.php'], $this->filterFixtureWith(Filters::noneOf([new SizeSmallerThanFilter(500), new ExtensionEqualsFilter('txt')]), true));
 }
Пример #3
0
 public function noneOf()
 {
     $this->assertEquals(['index.html'], iterator_to_array($this->filter(['file.txt', 'index.html', 'test.php'], Filters::noneOf([newinstance('util.Filter<string>', [], ['accept' => function ($e) {
         return strstr($e, 'test');
     }]), newinstance('util.Filter<string>', [], ['accept' => function ($e) {
         return strstr($e, '.txt');
     }])]))));
 }