Esempio n. 1
0
 /**
  * Verifies that we can test for support.
  */
 public function testSupports()
 {
     self::assertFalse($this->loader->supports('test'));
     self::assertFalse($this->loader->supports(new Resource('test.xml')));
     self::assertTrue($this->loader->supports(new Resource('test.yml')));
     self::assertTrue($this->loader->supports(new ResourceSupport('test.yml.dist', 'test.yml')));
 }
 /**
  * {@inheritdoc}
  */
 public function supports($collection, $type = null)
 {
     if ($collection instanceof ResourceCollection) {
         foreach ($collection as $resource) {
             if (parent::supports($resource)) {
                 return true;
             }
         }
     }
     return false;
 }