/**
  * Test case for oePayPalOrderPayment::hasPendingPayment()
  * Checks if list has pending payments
  *
  * @return null
  */
 public function testAddComment()
 {
     $oList = new oePayPalOrderPaymentCommentList();
     $oList->load('payment');
     $this->assertEquals(0, count($oList));
     $oComment = new oePayPalOrderPaymentComment();
     $oComment->setPaymentId('payment');
     $oComment->save();
     $oList = new oePayPalOrderPaymentCommentList();
     $oList->load('payment');
     $this->assertEquals(1, count($oList));
     $oComment = new oePayPalOrderPaymentComment();
     $oComment->setComment('Comment');
     $oList->addComment($oComment);
     $oList = new oePayPalOrderPaymentCommentList();
     $oList->load('payment');
     $this->assertEquals(2, count($oList));
 }
 /**
  * Test case for oePayPalPayPalOrder::save()
  * Tests adding / getting PayPal Order Payment history item
  *
  * @return null
  */
 public function testSavePayPalPayPalOrder_update()
 {
     $oComment = new oePayPalOrderPaymentComment();
     $oComment->setCommentId(10);
     $oComment->setDate('2013-02-03 12:12:12');
     $oComment->setComment('comment');
     $oComment->setPaymentId(2);
     $oComment->save();
     $oCommentLoaded = new oePayPalOrderPaymentComment();
     $oCommentLoaded->load(10);
     $oCommentLoaded->setComment('comment comment');
     $id = $oCommentLoaded->save();
     $this->assertEquals(10, $id);
     $oCommentLoaded = new oePayPalOrderPaymentComment();
     $oCommentLoaded->load(10);
     $this->assertEquals(10, $oCommentLoaded->getCommentId());
     $this->assertEquals('comment comment', $oCommentLoaded->getComment());
     $this->assertEquals(2, $oCommentLoaded->getPaymentId());
     $this->assertEquals('2013-02-03 12:12:12', $oCommentLoaded->getDate());
 }