Skip to content

Commit

Permalink
Don't throw NotUpdatedExceptions in BeforeScenario and AfterScenario …
Browse files Browse the repository at this point in the history
…hooks.
  • Loading branch information
becw committed Aug 9, 2016
1 parent 1de9a79 commit 9ccbc8c
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ class DrupalAutoNodetitleContext extends SharedDrupalContext
*/
public function disableAutoNodetitle()
{
throw new NotUpdatedException();

$this->disableAutoNodetitle = true;

}//end disableAutoNodetitle()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ class DrupalCommentContext extends SharedDrupalContext
*/
public function gatherContexts(BeforeScenarioScope $scope)
{
throw new NotUpdatedException();

$environment = $scope->getEnvironment();
$this->drupalContext = $environment->getContext('Drupal\DrupalExtension\Context\DrupalContext');

Expand All @@ -82,11 +80,12 @@ public function gatherContexts(BeforeScenarioScope $scope)
*/
public function checkDependencies(BeforeScenarioScope $scope)
{
throw new NotUpdatedException();
//throw new NotUpdatedException();
// @todo Update for Drupal 8

if (module_exists('comment') === false) {
throw new \Exception('The Comment module is not available.');
}
//if (module_exists('comment') === false) {
// throw new \Exception('The Comment module is not available.');
//}

}//end checkDependencies()

Expand All @@ -100,12 +99,13 @@ public function checkDependencies(BeforeScenarioScope $scope)
*/
public function cleanComments()
{
throw new NotUpdatedException();
//throw new NotUpdatedException();
// @todo Update for Drupal 8

// Remove any comments that were created.
foreach ($this->comments as $comment) {
comment_delete($comment->cid);
}
//foreach ($this->comments as $comment) {
// comment_delete($comment->cid);
//}

$this->comments = array();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ class DrupalOrganicGroupsContext extends SharedDrupalContext
*/
public function gatherContexts(BeforeScenarioScope $scope)
{
throw new NotUpdatedException();

$environment = $scope->getEnvironment();
$this->drupalContext = $environment->getContext('Drupal\DrupalExtension\Context\DrupalContext');

Expand All @@ -65,11 +63,12 @@ public function gatherContexts(BeforeScenarioScope $scope)
*/
public function checkDependencies(BeforeScenarioScope $scope)
{
throw new NotUpdatedException();
//throw new NotUpdatedException();
// @todo Update for Drupal 8

if (module_exists('og') === false) {
throw new \Exception('The Organic Groups module is not installed.');
}
//if (module_exists('og') === false) {
// throw new \Exception('The Organic Groups module is not installed.');
//}

}//end checkDependencies()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ class DrupalWorkbenchModerationContext extends SharedDrupalContext
*/
public function disableWorkbenchModeration()
{
throw new NotUpdatedException();

$this->disableWorkbenchModeration = true;

}//end disableWorkbenchModeration()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,12 @@ public function expandFile($file)
*/
public function cleanFiles()
{
throw new NotUpdatedException();
//throw new NotUpdatedException();
// @todo Update for Drupal 8

foreach ($this->files as $file) {
file_delete($file, true);
}
//foreach ($this->files as $file) {
// file_delete($file, true);
//}

$this->files = array();

Expand Down

0 comments on commit 9ccbc8c

Please sign in to comment.