/**
  * @test
  * @expectedException \RuntimeException
  */
 public function thatFileUploadThrowExceptionWhenDirectoryDoesNotExist()
 {
     $this->dirMock = new FileInfoStub(self::NON_EXISTENT_DIR, false, false);
     $this->handler = new BranchLogoHandler($this->dirMock, $this->fileSysMock);
     $this->fileMock = new UploadedFileStub($this->fixturesDir . '/' . self::PNG_FIXTURE_NAME, self::PNG_FIXTURE_NAME, 'image/png');
     $this->assertEquals('image/png', $this->fileMock->getMimeType());
     $this->assertEquals('png', strtolower($this->fileMock->guessExtension()));
     $this->assertEquals(false, $this->dirMock->isDir());
     $this->assertEquals(false, $this->dirMock->isWritable());
     $this->handler->upload($this->fileMock, self::PNG_FIXTURE_NAME);
 }