@@ -73,6 +73,6 @@ |
||
73 | 73 | $operation = "/$operation"; |
74 | 74 | } |
75 | 75 | |
76 | - return $this->entityType() . "/$id$operation"; |
|
76 | + return $this->entityType()."/$id$operation"; |
|
77 | 77 | } |
78 | 78 | } |
@@ -11,8 +11,8 @@ |
||
11 | 11 | // Helpers. |
12 | 12 | use Behat\Mink\Element\NodeElement; |
13 | 13 | // Utils. |
14 | -use Drupal\TqExtension\Utils\XPath; |
|
15 | 14 | use Drupal\TqExtension\Cores\DrupalKernelPlaceholder; |
15 | +use Drupal\TqExtension\Utils\XPath; |
|
16 | 16 | |
17 | 17 | class RawPageContext extends RawDrupalContext |
18 | 18 | { |
@@ -7,9 +7,9 @@ |
||
7 | 7 | // Scope definitions. |
8 | 8 | use Behat\Behat\Hook\Scope; |
9 | 9 | // Utils. |
10 | +use Drupal\TqExtension\Cores\DrupalKernelPlaceholder; |
|
10 | 11 | use Drupal\TqExtension\Utils\Database\Database; |
11 | 12 | use Drupal\TqExtension\Utils\LogicalAssertion; |
12 | -use Drupal\TqExtension\Cores\DrupalKernelPlaceholder; |
|
13 | 13 | |
14 | 14 | class TqContext extends RawTqContext |
15 | 15 | { |
@@ -4,14 +4,14 @@ |
||
4 | 4 | */ |
5 | 5 | |
6 | 6 | use Behat\Behat\Hook\Scope\BeforeFeatureScope; |
7 | -use Drupal\Core\Field\FieldDefinitionInterface; |
|
8 | -use Drupal\Core\Entity\FieldableEntityInterface; |
|
9 | -use Drupal\Core\Session\AccountInterface; |
|
7 | +use Drupal\Component\Render\FormattableMarkup; |
|
8 | +use Drupal\Component\Serialization\Json; |
|
10 | 9 | use Drupal\Core\Database\Database; |
11 | 10 | use Drupal\Core\Database\Query\Select; |
11 | +use Drupal\Core\Entity\FieldableEntityInterface; |
|
12 | +use Drupal\Core\Field\FieldDefinitionInterface; |
|
13 | +use Drupal\Core\Session\AccountInterface; |
|
12 | 14 | use Drupal\Core\StringTranslation\TranslatableMarkup; |
13 | -use Drupal\Component\Render\FormattableMarkup; |
|
14 | -use Drupal\Component\Serialization\Json; |
|
15 | 15 | use Drupal\TqExtension\Utils\Database\FetchField; |
16 | 16 | |
17 | 17 | // @codingStandardsIgnoreStart |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | $entity = entity_create($entityType, $values); |
164 | 164 | |
165 | 165 | entity_save($entityType, $entity); |
166 | - list($entityId, , $bundle) = entity_extract_ids($entityType, $entity); |
|
166 | + list($entityId,, $bundle) = entity_extract_ids($entityType, $entity); |
|
167 | 167 | |
168 | 168 | return [$entityId, $entityType, $bundle]; |
169 | 169 | } |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | { |
268 | 268 | $file .= '.js'; |
269 | 269 | $modulePath = static::drupalGetFilename('module', 'system'); |
270 | - $destination = dirname($modulePath) . '/' . $file; |
|
270 | + $destination = dirname($modulePath).'/'.$file; |
|
271 | 271 | $injection = "\ndrupal_add_js('$destination', array('every_page' => TRUE));"; |
272 | 272 | |
273 | 273 | if ($delete) { |
@@ -277,13 +277,13 @@ discard block |
||
277 | 277 | $replace = ''; |
278 | 278 | } else { |
279 | 279 | static::fileUnmanagedCopy( |
280 | - str_replace('Context', 'JavaScript', __DIR__) . '/' . $file, |
|
280 | + str_replace('Context', 'JavaScript', __DIR__).'/'.$file, |
|
281 | 281 | $destination, |
282 | 282 | FILE_EXISTS_REPLACE |
283 | 283 | ); |
284 | 284 | |
285 | 285 | $search = 'system_add_module_assets();'; |
286 | - $replace = $search . $injection; |
|
286 | + $replace = $search.$injection; |
|
287 | 287 | } |
288 | 288 | |
289 | 289 | file_put_contents($modulePath, str_replace($search, $replace, file_get_contents($modulePath))); |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | // Start with base URL when path is empty, or not starts from "//" or "http". |
38 | 38 | if (empty($path) || strpos($path, '//') !== 0 && strpos($path, 'http') !== 0) { |
39 | - $path = rtrim($baseUrl, '/') . '/' . trim($path, '/'); |
|
39 | + $path = rtrim($baseUrl, '/').'/'.trim($path, '/'); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | $this->setUrl($path)->scheme()->credentials()->host()->components(); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | throw new \InvalidArgumentException(sprintf('%s - invalid scheme.', $this->components['scheme'])); |
88 | 88 | } |
89 | 89 | |
90 | - $this->url = $this->components['scheme'] . '://'; |
|
90 | + $this->url = $this->components['scheme'].'://'; |
|
91 | 91 | |
92 | 92 | return $this; |
93 | 93 | } |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | // Encode special characters in username and password. Useful |
104 | 104 | // when some item contain something like "@" symbol. |
105 | 105 | foreach (['user' => ':', 'pass' => '@'] as $part => $suffix) { |
106 | - $this->url .= rawurlencode($this->components[$part]) . $suffix; |
|
106 | + $this->url .= rawurlencode($this->components[$part]).$suffix; |
|
107 | 107 | } |
108 | 108 | } |
109 | 109 | |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | { |
132 | 132 | foreach (['port' => ':', 'path' => '', 'query' => '?', 'fragment' => '#'] as $part => $prefix) { |
133 | 133 | if (isset($this->components[$part])) { |
134 | - $this->url .= $prefix . $this->components[$part]; |
|
134 | + $this->url .= $prefix.$this->components[$part]; |
|
135 | 135 | } |
136 | 136 | } |
137 | 137 |
@@ -11,21 +11,21 @@ |
||
11 | 11 | use Behat\Behat\Context\Exception\ContextNotFoundException; |
12 | 12 | use Behat\DebugExtension\Debugger; |
13 | 13 | // Helpers. |
14 | -use WebDriver\Session; |
|
15 | -use Drupal\Driver\DrushDriver; |
|
16 | -use Drupal\Driver\DriverInterface as DrupalDriverInterface; |
|
17 | -use Drupal\Component\Utility\Random; |
|
18 | -use Behat\Mink\Element\NodeElement; |
|
14 | +use Behat\Behat\Context\Environment\InitializedContextEnvironment; |
|
15 | +use Behat\Behat\Hook\Scope\StepScope; |
|
16 | +use Behat\Mink\Driver\DriverInterface as SessionDriverInterface; |
|
19 | 17 | use Behat\Mink\Driver\GoutteDriver; |
20 | 18 | use Behat\Mink\Driver\Selenium2Driver; |
21 | -use Behat\Mink\Driver\DriverInterface as SessionDriverInterface; |
|
22 | -use Behat\Behat\Hook\Scope\StepScope; |
|
23 | -use Behat\Behat\Context\Environment\InitializedContextEnvironment; |
|
19 | +use Behat\Mink\Element\NodeElement; |
|
24 | 20 | use Behat\Testwork\Environment\Environment; |
21 | +use Drupal\Component\Utility\Random; |
|
22 | +use Drupal\Driver\DriverInterface as DrupalDriverInterface; |
|
23 | +use Drupal\Driver\DrushDriver; |
|
24 | +use WebDriver\Session; |
|
25 | 25 | // Utils. |
26 | -use Drupal\TqExtension\Utils\Url; |
|
27 | -use Drupal\TqExtension\Utils\Tags; |
|
28 | 26 | use Drupal\TqExtension\Cores\DrupalKernelPlaceholder; |
27 | +use Drupal\TqExtension\Utils\Tags; |
|
28 | +use Drupal\TqExtension\Utils\Url; |
|
29 | 29 | |
30 | 30 | /** |
31 | 31 | * @see RawTqContext::__call() |