public function startTest($method) { parent::startTest($method); $this->Payments =& new TestPaymentsController(); $this->Payments->__construct(); $this->Payments->constructClasses(); $this->Payments->Notifier->QueueEmail = new MockPaymentsQueueEmailComponent(); $this->Payments->Notifier->QueueEmail->enabled = true; $this->Payments->Notifier->QueueEmail->initialize($this->Payments); $this->Payments->Notifier->QueueEmail->setReturnValue('_smtp', true); $this->Payments->Notifier->QueueEmail->setReturnValue('_mail', true); $CreditCard = new CreditCard(); $CreditCard->setGateway(new TestPaymentsControllerAuthorizeDotNetComponent()); ClassRegistry::removeObject('CreditCard'); ClassRegistry::addObject('CreditCard', $CreditCard); ClassRegistry::init('CreditCard'); // necessary fixtures $this->loadFixtures('Payment', 'User', 'Roster', 'PaymentType', 'PaymentOption', 'Involvement', 'InvolvementType', 'Profile', 'Address', 'Leader'); $this->testController = $this->Payments; }