setCount(self::$count); $history->setNextId(self::$nextId); $history->setPayments(array(PaymentTest::createPayment())); return $history; } public function setup() { $this->history = PaymentHistoryTest::createPaymentHistory(); } public function testGetterSetters() { $this->assertEquals(self::$count, $this->history->getCount()); $this->assertEquals(self::$nextId, $this->history->getNextId()); } public function testSerializeDeserialize() { $history = new PaymentHistory(); $history->fromJson($this->history->toJSON()); $this->assertEquals($history, $this->history); } }