Completed
Pull Request — master (#157)
by
unknown
01:50
created

DriverKernelTestTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 1
dl 0
loc 18
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A setUpDriver() 0 8 1
1
<?php
2
3
namespace Drupal\Tests\Driver\Kernel;
4
5
use Drupal\Driver\DrupalDriver;
6
7
/**
8
 * Provides common functionality for the Driver kernel tests.
9
 */
10
trait DriverKernelTestTrait
11
{
12
  /**
13
   * Drupal Driver.
14
   *
15
   * @var \Drupal\Driver\DriverInterface
16
   */
17
    protected $driver;
18
19
    protected function setUpDriver()
20
    {
21
        // @todo These hard-coded values are only necessary to test the driver's
22
        // methods directly. Doing so becomes less important once more logic has
23
        // been moved off the driver into other directly testable classes.
24
        $this->driver = new DrupalDriver('/app/web', 'http://nothing');
25
        $this->driver->setCoreFromVersion();
26
    }
27
}
28