public static function getEnvironmentFromJsonString($string) { $environment = new Application_Model_Environment(); $environment->fromJson($string); $environment->clearExpiredLock(); return $environment; }
public function testFromJson_InvalidJson() { $env = new Application_Model_Environment(); $this->setExpectedException('InvalidArgumentException'); $env->fromJson('{ "id": "id", "name":"name", "domainname":"f.q.d.n" '); }