/** * @param bool $isAdminStore * @param boolean $isConfirmed * @dataProvider forceConfirmedDataProvider */ public function testCustomerSetForceConfirmed($isAdminStore, $isConfirmed) { $this->_model->setIsAdminStore($isAdminStore); $customerData = array('firstname' => 'ServiceTest', 'lastname' => 'ForceConfirmed', 'email' => 'test' . mt_rand(1000, 9999) . '@mail.com', 'password' => '123123q'); $this->_createdCustomer = $this->_model->create($customerData); $this->assertEquals($isConfirmed, $this->_createdCustomer->getForceConfirmed()); }
/** * @expectedException Mage_Core_Exception * @expectedExceptionMessage The address with the specified ID not found. */ public function testPrepareCustomerAddressForSaveException() { $this->_customer->expects($this->any())->method('getId')->will($this->returnValue(1)); $address = $this->_createAddress(true, 1); $this->_customer->expects($this->once())->method('getAddressItemById')->with($address->getId())->will($this->returnValue(false)); $this->_service->update(1, array(), array(array('entity_id' => 1, 'city' => 'test'))); }