class AcceptanceHelper extends \Codeception\Module
{
/**
* Check a node creation was successful.
*
* This overrides the default since the css selectors are different in
* this site's theme.
*
* @see DrupalContentTypeRegistry::seeCreateNodeWasSuccessful()
*
* @param WebInterface $I
* A reference to the Actor being used.
* @param string $msg
* The success message that should be displayed by Drupal.
* @param int $nid
* The created nid.
*/
public function seeCreateNodeWasSuccessful($I, $msg, $nid)
{
$I->see($msg, ".messages");
$I->dontSee(" ", ".messages.error");
}
/**
* Check a node deletion was successful.
*
* This overrides the default since this site redirects to the
* homepage on node deletion and does not show a message. We
* therefore do a check by editing the node and make sure it's
* not found.
*
* @see DrupalContentTypeRegistry::seeDeleteNodeWasSuccessful()
*
* @param AuthenticatedSteps $I
* A reference to the Actor being used.
* @param int $nid
* The deleted nid.
*/
public function seeDeleteNodeWasSuccessful($I, $nid)
{
$I->amOnPage(NodePage::route($nid, true));
$I->see("we can't find this page", "h1");
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.