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

DriverKernelTestTrait::setUpDriver()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
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