/**
  * @test
  */
 public function createFolderChecksIfParentFolderExistsBeforeCreatingFolder()
 {
     $mockedParentFolder = $this->getSimpleFolderMock('/someFolder/');
     $mockedDriver = $this->createDriverMock(array());
     $mockedDriver->expects($this->once())->method('folderExists')->with($this->equalTo('/someFolder/'))->will($this->returnValue(TRUE));
     $mockedDriver->expects($this->once())->method('createFolder')->with($this->equalTo('newFolder'))->will($this->returnValue($mockedParentFolder));
     $this->prepareFixture(array(), TRUE);
     $this->fixture->setDriver($mockedDriver);
     $this->fixture->createFolder('newFolder', $mockedParentFolder);
 }
Пример #2
0
 /**
  * @test
  * @TODO: Rewrite or move to functional suite
  */
 public function createFolderChecksIfParentFolderExistsBeforeCreatingFolder()
 {
     $this->markTestSkipped('This test does way to much and is mocked incomplete. Skipped for now.');
     $mockedParentFolder = $this->getSimpleFolderMock('/someFolder/');
     $mockedDriver = $this->createDriverMock(array());
     $mockedDriver->expects($this->once())->method('folderExists')->with($this->equalTo('/someFolder/'))->will($this->returnValue(true));
     $mockedDriver->expects($this->once())->method('createFolder')->with($this->equalTo('newFolder'))->will($this->returnValue($mockedParentFolder));
     $this->prepareSubject(array(), true);
     $this->subject->setDriver($mockedDriver);
     $this->subject->createFolder('newFolder', $mockedParentFolder);
 }