Reworked test to check for PHP version
`password_hash` is PHP 5.5. Instead of adding the sanity check in the code, I've opted to put it in the test to ditch the overhead of having to make that check for every request.
This commit is contained in:
parent
1b365bcff0
commit
31f4c32fb0
2 changed files with 11 additions and 2 deletions
|
@ -144,10 +144,19 @@ namespace
|
|||
'regex' => 'abc',
|
||||
];
|
||||
|
||||
if (version_compare(PHP_VERSION, '5.5.0', '<'))
|
||||
{
|
||||
unset($_GET['bar']);
|
||||
}
|
||||
|
||||
new Pickles\Router();
|
||||
|
||||
$this->assertEquals('bar', $_GET['foo']);
|
||||
$this->assertFalse('unencrypted' == $_GET['bar']);
|
||||
|
||||
if (version_compare(PHP_VERSION, '5.5.0', '<'))
|
||||
{
|
||||
$this->assertFalse('unencrypted' == $_GET['bar']);
|
||||
}
|
||||
}
|
||||
|
||||
public function testHTTPS()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue