/**
  * @test
  */
 public function createFolderThrowsExceptionIfParentFolderDoesNotExist()
 {
     $this->setExpectedException('InvalidArgumentException', '', 1325689164);
     $mockedParentFolder = $this->getSimpleFolderMock('/someFolder/');
     $this->prepareSubject(array(), true);
     $mockedDriver = $this->createDriverMock(array(), $this->subject);
     $mockedDriver->expects($this->once())->method('folderExists')->with($this->equalTo('/someFolder/'))->will($this->returnValue(false));
     $this->subject->createFolder('newFolder', $mockedParentFolder);
 }
Esempio n. 2
0
	/**
	 * Creates a new folder
	 *
	 * @param string $folderName
	 * @return Folder The new folder object
	 */
	public function createFolder($folderName) {
		return $this->storage->createFolder($folderName, $this);
	}
Esempio n. 3
0
 /**
  * Ensures a new folder "fileadmin/content_upload/" is available.
  *
  * @return void
  */
 protected function checkPrerequisites()
 {
     if (!$this->storage->hasFolder(self::FOLDER_ContentUploads)) {
         $this->storage->createFolder(self::FOLDER_ContentUploads, $this->storage->getRootLevelFolder());
     }
 }
Esempio n. 4
0
 /**
  * Ensures a new folder "fileadmin/content_upload/" is available.
  *
  * @return void
  */
 protected function checkPrerequisites()
 {
     if (!$this->storage->hasFolder(self::FILE_MIGRATION_FOLDER)) {
         $this->storage->createFolder(self::FILE_MIGRATION_FOLDER, $this->storage->getRootLevelFolder());
     }
 }
Esempio n. 5
0
 /**
  * Ensures a new folder "fileadmin/content_upload/" is available.
  *
  * @return void
  */
 protected function checkPrerequisites()
 {
     if (!$this->storage->hasFolder(\TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard::FOLDER_ContentUploads)) {
         $this->storage->createFolder(\TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard::FOLDER_ContentUploads, $this->storage->getRootLevelFolder());
     }
 }