GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — 8.x-2.x ( d5ef2d...39375c )
by Devin
15:25
created

RoboFile   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 67
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
dl 0
loc 67
rs 10
c 0
b 0
f 0
wmc 6
lcom 0
cbo 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A taskBehat() 0 8 2
B testBehat() 0 25 4
1
<?php
2
3
class RoboFile extends \Robo\Tasks {
4
5
  /**
6
   * {@inheritdoc}
7
   */
8
  protected function taskBehat($behat = NULL) {
9
    $behat = $behat ?: 'bin/behat';
10
11
    return parent::taskBehat($behat)
12
      ->config('docroot/sites/default/files/behat.yml')
13
      ->option('strict')
14
      ->stopOnFail();
15
  }
16
17
  /**
18
   * Run Behat tests.
19
   *
20
   * To run all tests, simply run 'test:behat'. To run a specific feature, you
21
   * can pass its path, relative to the tests/features directory:
22
   *
23
   * test:behat -- media/image.feature
24
   *
25
   * You can omit the .feature extension. This example runs
26
   * tests/features/workflow/diff.feature:
27
   *
28
   * test:behat -- workflow/diff
29
   *
30
   * This also works with a directory of features. This example runs everything
31
   * in tests/features/media:
32
   *
33
   * test:behat -- media
34
   *
35
   * Any command-line options after the initial -- will be passed unmodified to
36
   * Behat. So you can filter tests by tags, like normal:
37
   *
38
   * test:behat -- --tags=javascript,~media
39
   *
40
   * This command will start Selenium Server in the background during the test
41
   * run, to support functional JavaScript tests.
42
   */
43
  public function testBehat(array $arguments) {
44
    $this
45
      ->taskExec('bin/selenium-server-standalone')
46
      ->rawArg('-port 4444')
47
      ->rawArg('-log selenium.log')
48
      ->background()
49
      ->run();
50
51
    $task = $this->taskBehat();
52
53
    foreach ($arguments as $argument) {
54
      if ($argument{0} == '-') {
55
        $task->rawArg($argument);
56
      }
57
      else {
58
        $feature = "tests/features/$argument";
59
60
        if (file_exists("$feature.feature")) {
61
          $feature .= '.feature';
62
        }
63
        $task->arg($feature);
64
      }
65
    }
66
    return $task;
67
  }
68
69
}
70