Example #1
0
 public function testGetCartItem()
 {
     $term = new Term(1);
     $product = new Product();
     $product->getBilling()->addTerm($term);
     $productDomain = new ProductDomain();
     $productDomain->getBilling()->addTerm($term);
     $productSharedHosting = new ProductSharedHosting();
     $productSharedHosting->getBilling()->addTerm($term);
     $productCpanelHosting = new ProductCpanelHosting();
     $productCpanelHosting->getBilling()->addTerm($term);
     $productVps = new ProductVps();
     $productVps->getBilling()->addTerm($term);
     $productSsl = new ProductSsl();
     $productSsl->getBilling()->addTerm($term);
     $catalog = new Catalog();
     $this->assertInstanceOf('\\Cart\\CartItem', $catalog->getCartItem($productCpanelHosting));
     $this->assertInstanceOf('\\Cart\\CartItem', $catalog->getCartItem($productSsl));
     $this->assertInstanceOf('\\Cart\\CartItemVps', $catalog->getCartItem($productVps));
     $this->assertInstanceOf('\\Cart\\CartItemSharedHosting', $catalog->getCartItem($productSharedHosting));
     $this->assertInstanceOf('\\Cart\\CartItemDomain', $catalog->getCartItem($productDomain));
     $this->assertInstanceOf('\\Cart\\CartItem', $catalog->getCartItem($product));
 }