Beispiel #1
0
 public static function getEnvironmentFromJsonString($string)
 {
     $environment = new Application_Model_Environment();
     $environment->fromJson($string);
     $environment->clearExpiredLock();
     return $environment;
 }
Beispiel #2
0
 public function testRestoreImmutableProperties()
 {
     $env = new Application_Model_Environment();
     $env->id = 'testenv01';
     $env->reload();
     $env->name = 'foobar';
     $env->domainname = 'test.ping.pong';
     $env->locked = false;
     $env->by = '';
     $env->restoreImmutableProperties();
     $this->assertEquals('testenv01', $env->id);
     $this->assertEquals('Test Env 01', $env->name);
     $this->assertEquals('testenv01.pingworks.net', $env->domainname);
     $this->assertEquals(false, $env->locked);
     $this->assertEquals('', $env->by);
     $this->assertEquals('2020-05-24 12:12:12', $env->until);
     $this->assertEquals('1.a914d764.62', $env->bundle);
 }