public function testConstructorWillSetVariables()
 {
     $domain = new StubMailDomainImpl($active = true, $domainName = "domain_name");
     $domain->description = $description = "some desc";
     $domain->lastModified = $lastModified = 123;
     $domain->aliasDomain = new StubMailDomainImpl(true, $aliasDomain = "SomeAlias");
     $jsonObject = new MailDomainObjectImpl($domain);
     $this->assertEquals('mail_domain', $jsonObject->getName());
     $this->assertEquals($domainName, $jsonObject->getVariable('domain_name'));
     $this->assertEquals($description, $jsonObject->getVariable('description'));
     $this->assertEquals($lastModified, $jsonObject->getVariable('last_modified'));
     $this->assertEquals($aliasDomain, $jsonObject->getVariable('alias_target'));
 }
 public function testReturnsRightJSONObject()
 {
     $this->assertEquals($o = new MailDomainObjectImpl($this->domain), $this->domain->jsonObjectSerialize());
     $this->assertEquals($o->jsonSerialize(), $this->domain->jsonSerialize());
 }