Skip to content

Commit

Permalink
Re-enable testing with the Drush Behat Endpoint. Drupal style checks …
Browse files Browse the repository at this point in the history
…are failing, though; remove them for now.
  • Loading branch information
greg-1-anderson committed Sep 20, 2018
1 parent c4cee77 commit e9e0d26
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
10 changes: 3 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,10 @@ install:
# For Drupal 8 install the behat drush endpoint.
# Pins symfony/dependency-injection to match core.
# @see https://github.com/jhedstrom/drupalextension/issues/413
# @todo Re-enable behat drush endpoint testing.
# @see https://github.com/jhedstrom/drupalextension/issues/458
- test ${DRUPAL_VERSION} -ne 8 || composer require --prefer-source drush/drush:~9.0 symfony/dependency-injection:3.4.4
- test ${DRUPAL_VERSION} -ne 8 || composer require --prefer-source drupal/drupal-driver drush/drush:^9.0.0-dev symfony/dependency-injection:3.4.4 && (git clone https://github.com/drush-ops/behat-drush-endpoint.git drush/Commands/contrib/behat-drush-endpoint)
- composer install
# Install drush globally.
- (test ${DRUPAL_VERSION} -ne 8 && composer global require drush/drush:~8.0 drupal/drupal-driver) || composer global require drush/drush:~9.0
- (test ${DRUPAL_VERSION} -ne 8 && composer global require drush/drush:~8.0 drupal/drupal-driver) || composer global require drush/drush:^9.0.0-dev
# Install the Behat Drush Endpoint for Drupal 7 tests.
- test ${DRUPAL_VERSION} -ne 7 || (git clone https://github.com/drush-ops/behat-drush-endpoint.git drush/behat-drush-endpoint && (cd drush/behat-drush-endpoint && composer install && cd -))
# Pin node version.
Expand Down Expand Up @@ -73,9 +71,7 @@ before_script:
- cd drupal
- drush --yes en behat_test
- drush cc drush
# @todo Re-enable behat drush endpoint testing.
# @see https://github.com/jhedstrom/drupalextension/issues/458
- test ${DRUPAL_VERSION} -eq 6 || test ${DRUPAL_VERSION} -eq 8 || (test ${DRUPAL_VERSION} -eq 7 && drush help behat)
- test ${DRUPAL_VERSION} -eq 6 || drush help behat
# Only revert features on Drupal 7.
- test \! ${DRUPAL_VERSION} -eq 7 || drush --yes fr behat_test
# Disable the page cache on Drupal 8.
Expand Down
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@
"composer validate --no-interaction",
"parallel-lint src spec features fixtures",
"phpcs --standard=./phpcs-ruleset.xml -p",
"phpcs --standard=./phpcs-drupal-ruleset.xml -p",
"npm test",
"phpspec run -f pretty --no-interaction"
],
"removed-test": [
"phpcs --standard=./phpcs-drupal-ruleset.xml -p"
]
},
"autoload": {
Expand Down
18 changes: 9 additions & 9 deletions src/Drupal/DrupalExtension/Context/RawDrupalContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -404,17 +404,17 @@ public function parseEntityFields($entity_type, \stdClass $entity)
// Reset the multicolumn field if the field name does not contain a column.
if (strpos($field, ':') === false) {
$multicolumn_field = '';
} // Start tracking a new multicolumn field if the field name contains a ':'
// which is preceded by at least 1 character.
elseif (strpos($field, ':', 1) !== false) {
} elseif (strpos($field, ':', 1) !== false) {
// Start tracking a new multicolumn field if the field name contains a ':'
// which is preceded by at least 1 character.
list($multicolumn_field, $multicolumn_column) = explode(':', $field);
} // If a field name starts with a ':' but we are not yet tracking a
// multicolumn field we don't know to which field this belongs.
elseif (empty($multicolumn_field)) {
} elseif (empty($multicolumn_field)) {
// If a field name starts with a ':' but we are not yet tracking a
// multicolumn field we don't know to which field this belongs.
throw new \Exception('Field name missing for ' . $field);
} // Update the column name if the field name starts with a ':' and we are
// already tracking a multicolumn field.
else {
} else {
// Update the column name if the field name starts with a ':' and we are
// already tracking a multicolumn field.
$multicolumn_column = substr($field, 1);
}

Expand Down

0 comments on commit e9e0d26

Please sign in to comment.