RawDrupalContext::getCore()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace NuvoleWeb\Drupal\DrupalExtension\Context;
4
5
use Behat\Behat\Context\SnippetAcceptingContext;
6
use Drupal\DrupalExtension\Context\RawDrupalContext as OriginalRawDrupalContext;
7
use Symfony\Component\DependencyInjection\ContainerBuilder;
8
9
/**
10
 * Class RawDrupalContext.
11
 *
12
 * @package NuvoleWeb\Drupal\DrupalExtension\Context
13
 */
14
class RawDrupalContext extends OriginalRawDrupalContext implements ServiceContainerAwareInterface, SnippetAcceptingContext {
0 ignored issues
show
Deprecated Code introduced by
The interface Behat\Behat\Context\SnippetAcceptingContext has been deprecated with message: will be removed in 4.0. Use --snippets-for CLI option instead

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
15
16
  /**
17
   * Service container instance.
18
   *
19
   * @var ContainerBuilder
20
   */
21
  private $container;
22
23
  /**
24
   * {@inheritdoc}
25
   */
26
  public function setContainer(ContainerBuilder $container) {
27
    $this->container = $container;
28
  }
29
30
  /**
31
   * {@inheritdoc}
32
   */
33
  public function getContainer() {
34
    return $this->container;
35
  }
36
37
  /**
38
   * Get current Drupal core.
39
   *
40
   * @return \NuvoleWeb\Drupal\Driver\Cores\CoreInterface|\Drupal\Driver\Cores\CoreInterface
41
   *    Drupal core object instance.
42
   */
43
  public function getCore() {
44
    return $this->getDriver()->getCore();
45
  }
46
47
}
48