Inheritance: implements AssetManager\Resolver\ResolverInterface, implements AssetManager\Resolver\MimeResolverAwareInterface
 /**
  * Test Collect returns valid list of assets
  *
  * @covers \AssetManager\Resolver\AliasPathStackResolver::collect
  */
 public function testCollectDirectory()
 {
     $alias = 'my/alias/';
     $resolver = new AliasPathStackResolver(array($alias => realpath(__DIR__ . '/../')));
     $dir = substr(__DIR__, strrpos(__DIR__, '/', 0) + 1);
     $this->assertContains($alias . $dir . DIRECTORY_SEPARATOR . basename(__FILE__), $resolver->collect());
     $this->assertNotContains($alias . $dir . DIRECTORY_SEPARATOR . 'i-do-not-exist.php', $resolver->collect());
 }
 /**
  * Test Lfi Protection
  *
  * @covers \AssetManager\Resolver\AliasPathStackResolver::resolve
  */
 public function testLfiProtection()
 {
     $mimeResolver = new MimeResolver();
     $resolver = new AliasPathStackResolver(array('my/alias/' => __DIR__));
     $resolver->setMimeResolver($mimeResolver);
     // should be on by default
     $this->assertTrue($resolver->isLfiProtectionOn());
     $this->assertNull($resolver->resolve('..' . DIRECTORY_SEPARATOR . basename(__DIR__) . DIRECTORY_SEPARATOR . basename(__FILE__)));
     $resolver->setLfiProtection(false);
     $this->assertEquals(file_get_contents(__FILE__), $resolver->resolve('my/alias/..' . DIRECTORY_SEPARATOR . basename(__DIR__) . DIRECTORY_SEPARATOR . basename(__FILE__))->dump());
 }