isEmpty() public method

Returns if cart is empty
public isEmpty ( ) : boolean
return boolean
Exemplo n.º 1
0
 function testEmpty()
 {
     $this->setUp();
     $cart = new EShoppingCart();
     $this->assertTrue($cart->isEmpty());
     $book = Book::model()->findByPk(1);
     $cart->put($book);
     $this->assertFalse($cart->isEmpty());
 }