public function testName() { $property = new Property(); $this->assertNull($property->getName()); $this->assertInstanceOf('iMoneza\\Data\\Property', $property->setName('the name')); $this->assertEquals('the name', $property->getName()); }
public function testPopulateWithArrayClass() { $values = ['Name' => 'the name', 'PricingGroups' => [['Name' => 'pricing group name']]]; $property = new Property(); $property->populate($values); $this->assertTrue(is_array($property->getPricingGroups())); $this->assertEquals('pricing group name', $property->getPricingGroups()[0]->getName()); $this->assertEquals('the name', $property->getName()); }