Completed
Pull Request — master (#315)
by
unknown
02:48
created

BlockContext   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 20
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getTranslationResources() 0 3 1
A assertPlaceBlockNew() 0 4 1
1
<?php
2
3
namespace Drupal\DrupalExtension\Context;
4
5
use Behat\MinkExtension\Context\RawMinkContext;
6
use Behat\Behat\Context\TranslatableContext;
7
8
/**
9
 * Extensions to the Mink Extension.
10
 */
11
class BlockContext extends RawDrupalContext implements TranslatableContext {
12
13
  /**
14
   * Returns list of definition translation resources paths.
15
   *
16
   * @return array
17
   */
18
  public static function getTranslationResources() {
19
    return glob(__DIR__ . '/../../../../i18n/*.xliff');
20
  }
21
22
  /**
23
   * @Given I place block :delta of module :module at region :region of theme :theme
24
   */
25
  public function assertPlaceBlockNew($delta, $module, $region, $theme) {
26
    $this->placeBlock($delta, $module, $region, $theme);
27
    $this->getSession()->getPage()->find("block-$module-$delta");
0 ignored issues
show
Bug introduced by
The call to find() misses a required argument $locator.

This check looks for function calls that miss required arguments.

Loading history...
28
  }
29
30
}
31