public function MediaBrowserPlusTest::testFolderCreation in Media Browser Plus 7.3
Same name and namespace in other branches
- 7.2 tests/media_browser_plus.test \MediaBrowserPlusTest::testFolderCreation()
Test the ability to create folders.
File
- tests/
media_browser_plus.test, line 26 - Media Browser Plus basic tests.
Class
- MediaBrowserPlusTest
- Basic media browser plus tests.
Code
public function testFolderCreation() {
$this
->drupalLogin($this->adminUser);
// Ensure the link to the taxonomy management is available.
// Just to have a verbose output.
$this
->drupalGet('admin/content/file/mbp');
$this
->assertLinkByHref('admin/structure/taxonomy/media_folders', 0, 'Found link to folder taxonomy');
// Just to have a verbose output.
$this
->drupalGet('admin/structure/taxonomy/media_folders');
// Create a normal folder structure.
$hierarchy = array(
'root_folder' => array(
$this
->randomName() => array(
$this
->randomName() => array(),
),
$this
->randomName() => array(
$this
->randomName() => array(),
),
),
);
$this
->folderCreationHelper($hierarchy);
// Just to have a verbose output.
$this
->drupalGet('admin/structure/taxonomy/media_folders');
}