aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auth/provider_apache_test.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2013-10-27 13:22:53 +0100
committerMarc Alexander <admin@m-a-styles.de>2013-10-27 13:22:53 +0100
commit760f148a2ba581df61a25d3efd0e438b5ea77e7b (patch)
tree4772abee4adc7356c2f8b40170a594edfe101000 /tests/auth/provider_apache_test.php
parentbb836b65e3c16fadf5c13510cce73daf432f7ad8 (diff)
downloadforums-760f148a2ba581df61a25d3efd0e438b5ea77e7b.tar
forums-760f148a2ba581df61a25d3efd0e438b5ea77e7b.tar.gz
forums-760f148a2ba581df61a25d3efd0e438b5ea77e7b.tar.bz2
forums-760f148a2ba581df61a25d3efd0e438b5ea77e7b.tar.xz
forums-760f148a2ba581df61a25d3efd0e438b5ea77e7b.zip
[feature/passwords] Fix tests on PHP < 5.3.3 again
PHPBB3-11610
Diffstat (limited to 'tests/auth/provider_apache_test.php')
-rw-r--r--tests/auth/provider_apache_test.php22
1 files changed, 19 insertions, 3 deletions
diff --git a/tests/auth/provider_apache_test.php b/tests/auth/provider_apache_test.php
index 4c09af33e5..34da8e1dab 100644
--- a/tests/auth/provider_apache_test.php
+++ b/tests/auth/provider_apache_test.php
@@ -42,12 +42,28 @@ class phpbb_auth_provider_apache_test extends phpbb_database_test_case
// Set up passwords manager
$passwords_manager = new \phpbb\passwords\manager($config, $passwords_drivers, $passwords_helper, 'passwords.driver.bcrypt_2y');
+ if (version_compare(PHP_VERSION, '5.3.7', '<'))
+ {
+ $this->password_hash = '$2a$10$e01Syh9PbJjUkio66eFuUu4FhCE2nRgG7QPc1JACalsPXcIuG2bbi';
+ }
+ else
+ {
+ $this->password_hash = '$2y$10$4RmpyVu2y8Yf/lP3.yQBquKvE54TCUuEDEBJYY6FDDFN3LcbCGz9i';
+ }
+
$this->provider = new \phpbb\auth\provider\apache($db, $config, $passwords_manager, $this->request, $this->user, $phpbb_root_path, $phpEx);
}
public function getDataSet()
{
- return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/user.xml');
+ if ((version_compare(PHP_VERSION, '5.3.7', '<')))
+ {
+ return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/user_533.xml');
+ }
+ else
+ {
+ return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/user.xml');
+ }
}
/**
@@ -94,7 +110,7 @@ class phpbb_auth_provider_apache_test extends phpbb_database_test_case
'user_row' => array(
'user_id' => '1',
'username' => 'foobar',
- 'user_password' => '$2y$10$4RmpyVu2y8Yf/lP3.yQBquKvE54TCUuEDEBJYY6FDDFN3LcbCGz9i',
+ 'user_password' => $this->password_hash,
'user_passchg' => '0',
'user_email' => 'example@example.com',
'user_type' => '0',
@@ -130,7 +146,7 @@ class phpbb_auth_provider_apache_test extends phpbb_database_test_case
'user_regdate' => '0',
'username' => 'foobar',
'username_clean' => 'foobar',
- 'user_password' => '$2y$10$4RmpyVu2y8Yf/lP3.yQBquKvE54TCUuEDEBJYY6FDDFN3LcbCGz9i',
+ 'user_password' => $this->password_hash,
'user_passchg' => '0',
'user_pass_convert' => '0',
'user_email' => 'example@example.com',