getObject() public static method

Gets Object Instance with Json data filled in
public static getObject ( ) : PayPal\Api\Measurement
return PayPal\Api\Measurement
Ejemplo n.º 1
0
 /**
  * @depends testSerializationDeserialization
  * @param Item $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getQuantity(), "TestSample");
     $this->assertEquals($obj->getName(), "TestSample");
     $this->assertEquals($obj->getDescription(), "TestSample");
     $this->assertEquals($obj->getPrice(), "12.34");
     $this->assertEquals($obj->getTax(), "12.34");
     $this->assertEquals($obj->getCurrency(), "TestSample");
     $this->assertEquals($obj->getSku(), "TestSample");
     $this->assertEquals($obj->getUrl(), "http://www.google.com");
     $this->assertEquals($obj->getCategory(), "TestSample");
     $this->assertEquals($obj->getWeight(), MeasurementTest::getObject());
     $this->assertEquals($obj->getLength(), MeasurementTest::getObject());
     $this->assertEquals($obj->getHeight(), MeasurementTest::getObject());
     $this->assertEquals($obj->getWidth(), MeasurementTest::getObject());
     $this->assertEquals($obj->getSupplementaryData(), NameValuePairTest::getObject());
     $this->assertEquals($obj->getPostbackData(), NameValuePairTest::getObject());
 }