function ViewExecutableFactoryTest::testGetNoRequest

Tests the get method when current request is null.

@legacy-covers ::get

File

core/modules/views/tests/src/Unit/ViewExecutableFactoryTest.php, line 119

Class

ViewExecutableFactoryTest
Tests Drupal\views\ViewExecutableFactory.

Namespace

Drupal\Tests\views\Unit

Code

public function testGetNoRequest() : void {
  $executable = $this->viewExecutableFactory
    ->get($this->view);
  $this->assertInstanceOf('Drupal\\views\\ViewExecutable', $executable);
  $this->assertSame($executable->getUser(), $this->user);
  $this->assertSame($executable->getRequest(), NULL);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.