/**
  *
  */
 public function setUp()
 {
     parent::setUp();
     $this->app = Mockery::mock('Illuminate\\Contracts\\Foundation\\Application');
     $this->app->shouldReceive('environment')->andReturn('production');
     $this->sut = new ForceHttpsUrlScheme($this->app);
     Helpers::$requestUri = '/path';
 }
 public function test_can_boot_service_provider_with_two_connection()
 {
     $this->registry->shouldReceive('getManagers')->once()->andReturn(['default' => $this->em, 'custom' => $this->em]);
     $this->em->shouldReceive('getConfiguration')->twice()->andReturn($this->configuration);
     $this->configuration->shouldReceive('getMetadataDriverImpl')->twice()->andReturn($this->chain);
     $this->chain->shouldReceive('getReader')->twice()->andReturn($this->reader);
     $this->chain->shouldReceive('addDriver')->twice();
     $this->app->shouldReceive('make')->with('config')->twice()->andReturn($this->config);
     $this->config->shouldReceive('get')->with('doctrine.gedmo.all_mappings', false)->twice()->andReturn(true);
     $this->provider->boot($this->registry);
 }
 public function test_listener_gets_bound_as_singleton()
 {
     $this->app->shouldReceive('singleton')->once()->with(UploadableListener::class);
     $this->provider->register();
 }