/** * @Then /^(?:|I )fill in the billing address/ */ public function fillInTheBillingAddress() { $generator = new Faker\Provider\Internet($this->faker); $this->email = $this->faker->email; $this->userName = $this->faker->userName; $this->password = $generator->password(10, 12); $firstName = $this->faker->firstName; $lastName = $this->faker->lastName; $this->name = $firstName . ' ' . $lastName; $address1 = $this->faker->streetAddress; $city = $this->faker->city; $postcode = $this->faker->postcode; $this->getSession()->getPage()->fillField('email', $this->email); $this->getSession()->getPage()->fillField('username_field', $this->userName); $this->getSession()->getPage()->fillField('name_field', $this->userName); $this->getSession()->getPage()->fillField('password_field', $this->password); $this->getSession()->getPage()->fillField('password2_field', $this->password); $this->getSession()->getPage()->fillField('first_name', $firstName); $this->getSession()->getPage()->fillField('last_name', $lastName); $this->getSession()->getPage()->fillField('address_1', $address1); $this->getSession()->getPage()->fillField('zip', $postcode); $this->getSession()->getPage()->fillField('city', $city); $this->getSession()->getPage()->find('css', '#virtuemart_country_id_chzn')->click(); $this->getSession()->getPage()->find('css', '#virtuemart_country_id_chzn .chzn-search input')->setValue('United Kingdom'); }
public function testCorrectNodeOfGeneratedUuid() { $macAdress = Faker\Provider\Internet::macAddress(); $uuidThree = Uuid::generate(1, $macAdress); $this->assertEquals(strtolower(str_replace(':', '', $macAdress)), $uuidThree->node); $uuidThree = Uuid::generate(3, $macAdress, Uuid::NS_DNS); $this->assertNull($uuidThree->node); $uuidThree = Uuid::generate(4, $macAdress); $this->assertNull($uuidThree->node); $uuidThree = Uuid::generate(5, $macAdress, Uuid::NS_DNS); $this->assertNull($uuidThree->node); }
/** * @Then /^I fill in the personal information/ */ public function iFillPersonalInformation() { $generator = new Faker\Provider\Internet($this->faker); $customerFirstname = $this->faker->firstName; $customerLastname = $this->faker->firstName; $this->name = $customerFirstname . ' ' . $customerLastname; $password = $generator->password(6, 10); $this->getSession()->getPage()->fillField('email', $this->email); $this->getSession()->getPage()->fillField('customer_firstname', $customerFirstname); $this->getSession()->getPage()->fillField('customer_lastname', $customerFirstname); $this->getSession()->getPage()->fillField('passwd', $password); $this->getSession()->getPage()->find('css', '#uniform-id_gender1')->click(); }