Mink
tests are also stored inside the Test
folder. Let's create the base skeleton of our Mink
test class:
Navigate to the
Test
folder on our module root.Create a new directory called
Mink
.Inside the
Mink
directory, create a new PHP class calledRegistry.php
.Copy the following code (the file location is
app/code/local/Mdg/Giftregistry/Test/Mink/Registry.php
):<?php class Mdg_Giftregistry_Test_Mink_Registry extends JR_Mink_Test_Mink { public function testAddProductToRegistry() { $this->section('TEST ADD PRODUCT TO REGISTRY'); $this->setCurrentStore('default'); $this->setDriver('goutte'); $this->context(); // Go to homepage $this->output($this->bold('Go To the Homepage')); $url = Mage::getStoreConfig('web/unsecure/base_url'); $this->visit($url); $category = $this->find('css', '#nav .nav-1-1 a'); if (!$category) { return false; }...