3 Commits
php54 ... 0.0.9

Author SHA1 Message Date
Meritoo
e902568a91 Participant & Survey - update creating instance od DateTime from string 2017-10-22 18:20:01 +02:00
Meritoo
626174953b Participant has completed survey - fix getting proper information 2017-10-22 18:18:16 +02:00
Meritoo
ddb568adf7 Tests - Docker - update Xdebug configuration
Required to fix problem "Connection with XDebug 2.5.1 was not established. Validate installation."
2017-10-22 17:56:24 +02:00
4 changed files with 13 additions and 9 deletions

View File

@@ -1,7 +1,6 @@
[xdebug]
zend_extension='xdebug.so'
zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.idekey='PHPSTORM'
xdebug.remote_port=9001
xdebug.remote_host=10.254.254.254

View File

@@ -199,7 +199,12 @@ class Participant extends BaseItem
break;
case 'completed':
$this->completed = 'Y' === trim(strtoupper($value));
if ('N' === trim(strtoupper($value))) {
$this->completed = false;
break;
}
$this->completed = Date::isValidDate($value, true);
break;
case 'usesleft':
@@ -211,7 +216,7 @@ class Participant extends BaseItem
break;
}
$this->validFrom = Date::getDateTime($value, false, 'Y-m-d H:i:s');
$this->validFrom = Date::getDateTime($value, true);
break;
case 'validuntil':
@@ -219,7 +224,7 @@ class Participant extends BaseItem
break;
}
$this->validUntil = Date::getDateTime($value, false, 'Y-m-d H:i:s');
$this->validUntil = Date::getDateTime($value, true);
break;
}
}

View File

@@ -74,7 +74,7 @@ class Survey extends BaseItem
break;
}
$this->startsAt = Date::getDateTime($value, false, 'Y-m-d H:i:s');
$this->startsAt = Date::getDateTime($value, true);
break;
case 'expires':
@@ -82,7 +82,7 @@ class Survey extends BaseItem
break;
}
$this->expiresAt = Date::getDateTime($value, false, 'Y-m-d H:i:s');
$this->expiresAt = Date::getDateTime($value, true);
break;
case 'active':

View File

@@ -200,7 +200,7 @@ class ParticipantTest extends BaseTestCase
'sent' => 'Y',
'remindersent' => 'N',
'remindercount' => 1,
'completed' => 'Y',
'completed' => (new DateTime())->format('Y-m-d H:i'),
'usesleft' => 5,
'validfrom' => (new DateTime())->format('Y-m-d H:i:s'),
'validuntil' => null,