Пример #1
0
 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());
 }
Пример #2
0
 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());
 }