File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed
src/Drupal/DrupalExtension/Context Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 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
24+ */
25+ public function assertPlaceBlockNew ($ delta , $ module , $ region ) {
26+ $ this ->placeBlock ($ delta , $ module , $ region );
27+ }
28+
29+ }
Original file line number Diff line number Diff line change @@ -603,4 +603,8 @@ public function loggedInWithRole($role) {
603603 return $ this ->loggedIn () && $ this ->getUserManager ()->currentUserHasRole ($ role );
604604 }
605605
606+ public function placeBlock ($ delta , $ module , $ region ) {
607+ $ this ->getDriver ()->placeBlock ($ delta , $ module , $ region );
608+ }
609+
606610}
You can’t perform that action at this time.
0 commit comments