public function MediaBrowserContext::upload in Lightning Media 8.3
Same name and namespace in other branches
- 8 tests/contexts/MediaBrowserContext.behat.inc \Acquia\LightningExtension\Context\MediaBrowserContext::upload()
- 8.2 tests/contexts/MediaBrowserContext.behat.inc \Acquia\LightningExtension\Context\MediaBrowserContext::upload()
Uploads a file in the media browser.
@When I upload :file
Parameters
string $file: The path to the file, relative to the test files directory.
1 call to MediaBrowserContext::upload()
- MediaBrowserContext::createFromUpload in tests/
contexts/ MediaBrowserContext.behat.inc - Creates a media item from a file upload.
File
- tests/
contexts/ MediaBrowserContext.behat.inc, line 175
Class
- MediaBrowserContext
- Contains step definitions for interacting with Lightning's media browser.
Namespace
Acquia\LightningExtension\ContextCode
public function upload($file) {
$file = __DIR__ . '/../files/' . $file;
Assert::fileExists($file);
$this->isJS ? $this
->uploadJs($file) : $this
->uploadNoJs($file);
}