Ejemplo n.º 1
0
 public function testDiscriminatorInitialization()
 {
     $new_dog = new Swagger\Client\Model\Dog();
     $this->assertSame('Dog', $new_dog->getClassName());
 }
Ejemplo n.º 2
0
 public function testInheritanceConstructorDataInitialization()
 {
     // initialize the object with data in the constructor
     $data = array('class_name' => 'Dog', 'breed' => 'Great Dane');
     $new_dog = new Swagger\Client\Model\Dog($data);
     // the property on the derived class should be set
     $this->assertSame('Great Dane', $new_dog->getBreed());
     // the property on the parent class should be set
     $this->assertSame('Dog', $new_dog->getClassName());
 }