You are here

public function DeleteTest::setSelectionFile in IMCE 8

Same name and namespace in other branches
  1. 8.2 tests/src/Kernel/Plugin/ImcePlugin/DeleteTest.php \Drupal\Tests\imce\Kernel\Plugin\ImcePlugin\DeleteTest::setSelectionFile()

Set the ImceFM::selection[].

1 call to DeleteTest::setSelectionFile()
DeleteTest::setUp in tests/src/Kernel/Plugin/ImcePlugin/DeleteTest.php

File

tests/src/Kernel/Plugin/ImcePlugin/DeleteTest.php, line 80

Class

DeleteTest
Kernel tests for Imce plugins for Imce Plugin Core.

Namespace

Drupal\Tests\imce\Kernel\Plugin\ImcePlugin

Code

public function setSelectionFile() {
  $this->imceFM->selection[] = $this->imceFM
    ->createItem('file', "ciandt.jpg", [
    'path' => '.',
  ]);

  // $this->imceFM->getConf()
  $this->imceFM->selection[0] = new ImceFile('ciandt.jpg');
  $this->imceFM->selection[0]
    ->setFm($this->imceFM);
  $this->imceFM->selection[0]->parent = new ImceFolder('.', $this
    ->getConf());
  $this->imceFM->selection[0]->parent
    ->setFm($this->imceFM);
  $this->imceFM->selection[0]->parent
    ->setPath('.');
}