function testRestoreFromSession() { $this->setUp(); $cart = new EShoppingCart(); $book = Book::model()->findByPk(1); $cart->put($book); $newCart = new EShoppingCart(); $newCart->restoreFromSession(); $this->assertEquals(1, $newCart->getItemsCount()); }