You are here

public function ViewportResolverTest::testIsPathSelectedWithoutPathProvided in Viewport 8

Tests isPathSelected method uses current path if none provided.

File

tests/src/Unit/ViewportResolverTest.php, line 96

Class

ViewportResolverTest
@coversDefaultClass \Drupal\viewport\ViewportResolver @group viewport

Namespace

Drupal\Tests\viewport\Unit

Code

public function testIsPathSelectedWithoutPathProvided() {
  $this
    ->assertTrue($this->viewportResolver
    ->isPathSelected(), 'Check configured path as current path.');
  $this
    ->assertFalse($this->viewportResolver
    ->isPathSelected(), 'Check non-configured path as current path.');
}