public function testGetWishlistWithIdWithoutCustomer() { $wishlist = $this->getMock('\\Magento\\Wishlist\\Model\\Wishlist', ['loadByCustomerId', 'load', 'getId', 'getCustomerId', '__wakeup'], [], '', false); $wishlist->expects($this->once())->method('load')->will($this->returnSelf()); $wishlist->expects($this->any())->method('getId')->will($this->returnValue(1)); $wishlist->expects($this->once())->method('getCustomerId')->will($this->returnValue(1)); $this->wishlistFactory->expects($this->once())->method('create')->will($this->returnValue($wishlist)); $this->request->expects($this->once())->method('getParam')->will($this->returnValue(1)); $this->assertEquals(false, $this->wishlistProvider->getWishlist()); }