Exemplo n.º 1
0
 public function testProdManifest()
 {
     $loader = $this->createManifestLoaderMock();
     $loader->expects($this->once())->method('loadManifest')->with($this->isInstanceOf('SplFileInfo'), $this->equalTo('desktop'), $this->equalTo(false))->willReturn(new Manifest(__DIR__ . '__files/workspace/build/production/MyApp/app.json', array()));
     $app = new Application($this->createDefaultConfiguration(), $loader, 'prod');
     $this->assertInstanceOf('TQ\\ExtJS\\Application\\Manifest\\Manifest', $app->getManifest());
 }
 /**
  * @param string  $build
  * @param string  $path
  * @param Request $request
  * @return Response
  */
 public function resourcesAction($build, $path, Request $request)
 {
     $this->closeSession($request);
     try {
         $buildArtifact = $this->application->getBuildArtifact(str_replace('~', '..', $path), $build);
     } catch (FileNotFoundException $e) {
         throw new NotFoundHttpException('Not Found', $e);
     }
     $file = new File($buildArtifact->getPathname());
     return $this->createBinaryFileResponse($request, $file, $this->determineContentType($file));
 }
 /**
  * @return string
  */
 public function getApplicationId()
 {
     return $this->application->getApplicationId();
 }