mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Merge branch '2.3', remote-tracking branch 'origin' into feature/smtp-tls
This commit is contained in:
commit
f1250a3609
3 changed files with 10 additions and 2 deletions
|
@ -125,10 +125,14 @@ class DatabaseSessionTest extends CakeTestCase {
|
|||
'Session' => array(
|
||||
'id' => 'foo',
|
||||
'data' => 'Some value',
|
||||
'expires' => time() + (Configure::read('Session.timeout') * 60)
|
||||
)
|
||||
);
|
||||
$expires = $result['Session']['expires'];
|
||||
unset($result['Session']['expires']);
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
$expected = time() + (Configure::read('Session.timeout') * 60);
|
||||
$this->assertWithinMargin($expires, $expected, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1782,6 +1782,10 @@ class ValidationTest extends CakeTestCase {
|
|||
$this->assertFalse(Validation::url('www.cakephp.org', true));
|
||||
$this->assertTrue(Validation::url('http://www.cakephp.org', true));
|
||||
$this->assertTrue(Validation::url('http://example.com/~userdir/'));
|
||||
$this->assertTrue(Validation::url('http://underscore_subdomain.example.org'));
|
||||
$this->assertTrue(Validation::url('http://_jabber._tcp.gmail.com'));
|
||||
$this->assertFalse(Validation::url('http://www.underscore_domain.org'));
|
||||
$this->assertFalse(Validation::url('http://_jabber._tcp.g_mail.com'));
|
||||
|
||||
$this->assertTrue(Validation::url('http://example.com/~userdir/subdir/index.html'));
|
||||
$this->assertTrue(Validation::url('http://www.zwischenraume.de'));
|
||||
|
|
|
@ -38,7 +38,7 @@ class Validation {
|
|||
* @var array
|
||||
*/
|
||||
protected static $_pattern = array(
|
||||
'hostname' => '(?:[a-z0-9][-a-z0-9]*\.)*(?:[a-z0-9][-a-z0-9]{0,62})\.(?:(?:[a-z]{2}\.)?[a-z]{2,4}|museum|travel)'
|
||||
'hostname' => '(?:[-_a-z0-9][-_a-z0-9]*\.)*(?:[a-z0-9][-a-z0-9]{0,62})\.(?:(?:[a-z]{2}\.)?[a-z]{2,4}|museum|travel)'
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue