예제 #1
0
 function testGetCount()
 {
     $this->setUp();
     $cart = new EShoppingCart();
     $book = Book::model()->findByPk(1);
     $cart->put($book, 3);
     $book = Book::model()->findByPk(2);
     $cart->put($book, 6);
     $this->assertEquals(2, $cart->count());
 }