public function testXListEnvironmentsAction()
{
$response = $this->internalRequest('/environments/xListEnvironments');
$this->assertResponseDataHasKeys(array('id' => $this->logicalNot($this->isEmpty()), 'name' => $this->isType('string'), 'dtAdded' => $this->logicalOr($this->isType('null'), $this->matchesRegularExpression('/.+,\\s[\\d]{4}\\s[\\d]{2}:[\\d]{2}:[\\d]{2}$/')), 'status' => $this->logicalOr($this->equalTo('Active'), $this->equalTo('Inactive')), 'platforms' => $this->isType('string')), $response, true);
$createdEnvironmentName = self::getTestName(self::ENV_NAME);
foreach ($response['data'] as $v) {
$this->_getInfoAction($v['id']);
if ($this->getUser()->isAccountOwner()) {
if ($v['name'] == $createdEnvironmentName) {
$this->_removeTestEnv($v['id']);
break;
}
}
}
}