PayPal\Test\Api\InvoiceItemTest::testSerializationDeserialization PHP Method

testSerializationDeserialization() public method

Tests for Serialization and Deserialization Issues
public testSerializationDeserialization ( ) : InvoiceItem
return PayPal\Api\InvoiceItem
    public function testSerializationDeserialization()
    {
        $obj = new InvoiceItem(self::getJson());
        $this->assertNotNull($obj);
        $this->assertNotNull($obj->getName());
        $this->assertNotNull($obj->getDescription());
        $this->assertNotNull($obj->getQuantity());
        $this->assertNotNull($obj->getUnitPrice());
        $this->assertNotNull($obj->getTax());
        $this->assertNotNull($obj->getDate());
        $this->assertNotNull($obj->getDiscount());
        $this->assertNotNull($obj->getImageUrl());
        $this->assertNotNull($obj->getUnitOfMeasure());
        $this->assertEquals(self::getJson(), $obj->toJson());
        return $obj;
    }