예제 #1
0
 public function testInvalidRequest()
 {
     $mimeResolver = new MimeResolver();
     $asset = new Asset\FileAsset(__FILE__);
     $asset->mimetype = $mimeResolver->getMimeType(__FILE__);
     $resolver = $this->getMock('AssetManager\\Resolver\\ResolverInterface');
     $resolver->expects($this->any())->method('resolve')->with('asset-path')->will($this->returnValue($asset));
     $request = new ConsoleRequest();
     $assetManager = new AssetManager($resolver);
     $resolvesToAsset = $assetManager->resolvesToAsset($request);
     $this->assertFalse($resolvesToAsset);
 }
예제 #2
0
 public function testGetUrlMimeType()
 {
     $mimeResolver = new MimeResolver();
     $this->assertEquals('application/javascript', $mimeResolver->getMimeType('http://foo.bar/file.js'));
 }