EditableTest.php in Views Node Access Filter 8
File
tests/src/Unit/EditableTest.php
View source
<?php
namespace Drupal\Tests\views_node_access_filter\Unit;
use Drupal\Tests\UnitTestCase;
use Drupal\views_node_access_filter\Plugin\views\filter\Editable;
class EditableTest extends UnitTestCase {
private $plugin;
protected function setUp() : void {
parent::setUp();
$this->plugin = new Editable([], 'foo', []);
}
public function testQuery() {
$this
->expectException(\Exception::class);
$this->plugin
->query();
}
public function testGetCacheContexts() {
$this
->assertContains('user', $this->plugin
->getCacheContexts());
}
public function testCanExpose() {
$this
->assertFalse($this->plugin
->canExpose());
}
}