public function testHasAttributes() { $d = new ServiceDescription(array('operations' => array(), 'name' => 'Name', 'description' => 'Description', 'apiVersion' => '1.24')); $this->assertEquals('Name', $d->getName()); $this->assertEquals('Description', $d->getDescription()); $this->assertEquals('1.24', $d->getApiVersion()); $s = serialize($d); $this->assertContains('"name":"Name"', $s); $this->assertContains('"description":"Description"', $s); $this->assertContains('"apiVersion":"1.24"', $s); $d = unserialize($s); $this->assertEquals('Name', $d->getName()); $this->assertEquals('Description', $d->getDescription()); $this->assertEquals('1.24', $d->getApiVersion()); }