/** * */ public function setUp() { $this->Provider = new StdClass(); $Container = new Container(); $Container->set('Foo', $this->Provider); $Container->set('filters', ['Foo' => '~^foo$~', 'Bar' => function ($url) { return $url === 'bar'; }]); $this->Collection = new Collection($Container); }
/** * */ public function setUp() { $this->Provider = new ProviderImplementation(new NullLogger()); $Container = new Container(); $Container->set('OEmbed', $this->Provider); $this->Collection = new Collection($Container); $this->Collection->setProperties(['Foo' => ['class' => 'OEmbed', 'filter' => '#^foo$#'], 'Bar' => ['class' => 'OpenGraph', 'filter' => function ($url) { return $url === 'bar'; }]]); }