3 namespace spec\Drupal\DrupalExtension\Context;
5 use PhpSpec\ObjectBehavior;
8 use Behat\Testwork\Hook\HookDispatcher;
9 use Behat\Testwork\Hook\HookRepository;
11 use Drupal\DrupalDriverManager;
13 class RawDrupalContextSpec extends ObjectBehavior
15 function it_should_be_drupal_aware()
17 $this->shouldHaveType('Drupal\DrupalExtension\Context\DrupalAwareInterface');
20 function it_can_set_and_get_drupal_manager(DrupalDriverManager $drupal)
22 $this->setDrupal($drupal);
23 $this->getDrupal()->shouldBeAnInstanceOf('Drupal\DrupalDriverManager');
26 function it_can_set_and_get_drupal_parameters()
32 $this->setDrupalParameters($parameters);
33 $this->getDrupalParameter('one')->shouldReturn('1');
34 $this->getDrupalParameter('two')->shouldReturn('2');
37 function it_can_manage_text_values()
44 $this->setDrupalParameters($parameters);
45 $this->getDrupalText('login')->shouldReturn('Log in');
46 $this->shouldThrow('Exception')->duringGetDrupalText('No such string');
49 function it_can_get_the_current_drupal_driver(DrupalDriverManager $drupal)
51 $this->setDrupal($drupal);