You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/**
* @Given I make sure the customer :mail does not exist in the :shop Shop
*/
public function iMakeSureTheCustomerDoesNotExistInTheShop($mail, $site)
{
$websites = Mage::app()->getWebsites();
foreach ($websites as $website) {
$name = $website->getName();
if ($site == $name) {
Mage::register('isSecureArea', true); /* set secure admin area*/
$customerModel = Mage::getModel('customer/customer');
$customerModel->setWebsiteId($website->getId());
$customer = $customerModel->loadByEmail($mail);
$customer->delete();
Mage::unregister('isSecureArea'); /* un set secure admin area*/
}
}
}
I have a behat test for the Customer-Registration in a Magento-Shop (1.8).
In order to rerun the test as often as I want
As a developer I want the Test to clear the generated user account in a scenario hook
Possible Solution:
BUT this does not work.
Then I move the code into a Stepdefinition it works. :(
The text was updated successfully, but these errors were encountered: