public function testCheckIfUserIsNotRegistering() { $quote = new Varien_Object(); $quote->setCheckoutMethod(Mage_Sales_Model_Quote::CHECKOUT_METHOD_REGISTER); $sessionMock = $this->getModelMock('checkout/session', array('getQuote')); $sessionMock->expects($this->any())->method('getQuote')->will($this->returnValue($quote)); $this->replaceByMock('model', 'checkout/session', $sessionMock); $this->assertTrue(Mage::helper('ops/data')->checkIfUserIsNotRegistering()); $quote->setCheckoutMethod(Mage_Sales_Model_Quote::CHECKOUT_METHOD_LOGIN_IN); $this->assertFalse(Mage::helper('ops/data')->checkIfUserIsNotRegistering()); $quote->setCheckoutMethod(Mage_Sales_Model_Quote::CHECKOUT_METHOD_GUEST); $this->assertFalse(Mage::helper('ops/data')->checkIfUserIsNotRegistering()); }