Skip to content

Commit

Permalink
ENH Use class name instead of self
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Jun 5, 2024
1 parent 678358e commit 077bd46
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Context/BasicContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -1043,11 +1043,11 @@ protected function getTable($selector)

// Find tables by a <caption> field
$candidates += $page->findAll('xpath', "//table//caption[contains(normalize-space(string(.)),
$selector)]/ancestor-or-self::table[1]");
$selector)]/ancestor-or-BasicContext::table[1]");

// Find tables by a .title node
$candidates += $page->findAll('xpath', "//table//*[contains(concat(' ',normalize-space(@class),' '), ' title ') and contains(normalize-space(string(.)),
$selector)]/ancestor-or-self::table[1]");
$selector)]/ancestor-or-BasicContext::table[1]");

// Some tables don't have a visible title, so look for a fieldset with data-name instead
$candidates += $page->findAll('xpath', "//fieldset[@data-name=$selector]//table");
Expand Down
2 changes: 1 addition & 1 deletion src/Context/FixtureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ public function stepUpdateRecordRelation($type, $id, $relation, $relationType, $
*/
public function stepIAssignObjToObj($type, $value, $relationType, $relationId)
{
self::stepIAssignObjToObjInTheRelation($type, $value, $relationType, $relationId, null);
FixtureContext::stepIAssignObjToObjInTheRelation($type, $value, $relationType, $relationId, null);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Extension implements ExtensionInterface
*/
public function getConfigKey()
{
return self::SILVERSTRIPE_ID;
return Extension::SILVERSTRIPE_ID;
}

public function initialize(ExtensionManager $extensionManager)
Expand Down
4 changes: 2 additions & 2 deletions src/Utility/RetryableCallHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@ protected function isCallRetryable(Call $call)
return false;
}
$feature = $call->getFeature();
if ($feature->hasTag(self::RETRY_TAG)) {
if ($feature->hasTag(RetryableCallHandler::RETRY_TAG)) {
return true;
}
$scenario = $this->getStepScenario($feature, $call->getStep());
return $scenario && $scenario->hasTag(self::RETRY_TAG);
return $scenario && $scenario->hasTag(RetryableCallHandler::RETRY_TAG);
}
}

0 comments on commit 077bd46

Please sign in to comment.