aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2013-10-02 23:45:32 +0200
committerMarc Alexander <admin@m-a-styles.de>2013-10-02 23:45:32 +0200
commit93531e7fb0df7d9cd2de04ca06aa9eb6a847a1c4 (patch)
tree9ea36b1216786a87c151a0af1824e6eacf978fc8
parente7e11112b17d6a8d4811d28376f1cc545243c08c (diff)
downloadforums-93531e7fb0df7d9cd2de04ca06aa9eb6a847a1c4.tar
forums-93531e7fb0df7d9cd2de04ca06aa9eb6a847a1c4.tar.gz
forums-93531e7fb0df7d9cd2de04ca06aa9eb6a847a1c4.tar.bz2
forums-93531e7fb0df7d9cd2de04ca06aa9eb6a847a1c4.tar.xz
forums-93531e7fb0df7d9cd2de04ca06aa9eb6a847a1c4.zip
[feature/passwords] Add prepending backslash to class namespaces
PHPBB3-11610
-rw-r--r--tests/auth/provider_apache_test.php14
-rw-r--r--tests/auth/provider_db_test.php14
-rw-r--r--tests/passwords/manager_test.php14
-rw-r--r--tests/security/hash_test.php16
-rw-r--r--tests/test_framework/phpbb_functional_test_case.php16
5 files changed, 37 insertions, 37 deletions
diff --git a/tests/auth/provider_apache_test.php b/tests/auth/provider_apache_test.php
index 5388ae0b0d..8f65e8ad39 100644
--- a/tests/auth/provider_apache_test.php
+++ b/tests/auth/provider_apache_test.php
@@ -25,12 +25,12 @@ class phpbb_auth_provider_apache_test extends phpbb_database_test_case
$config = new \phpbb\config\config(array());
$this->request = $this->getMock('\phpbb\request\request');
$this->user = $this->getMock('\phpbb\user');
- $driver_helper = new phpbb\passwords\driver\helper($config);
+ $driver_helper = new \phpbb\passwords\driver\helper($config);
$passwords_drivers = array(
- 'passwords.driver.bcrypt' => new phpbb\passwords\driver\bcrypt($config, $driver_helper),
- 'passwords.driver.bcrypt_2y' => new phpbb\passwords\driver\bcrypt_2y($config, $driver_helper),
- 'passwords.driver.salted_md5' => new phpbb\passwords\driver\salted_md5($config, $driver_helper),
- 'passwords.driver.phpass' => new phpbb\passwords\driver\phpass($config, $driver_helper),
+ 'passwords.driver.bcrypt' => new \phpbb\passwords\driver\bcrypt($config, $driver_helper),
+ 'passwords.driver.bcrypt_2y' => new \phpbb\passwords\driver\bcrypt_2y($config, $driver_helper),
+ 'passwords.driver.salted_md5' => new \phpbb\passwords\driver\salted_md5($config, $driver_helper),
+ 'passwords.driver.phpass' => new \phpbb\passwords\driver\phpass($config, $driver_helper),
);
foreach ($passwords_drivers as $key => $driver)
@@ -38,9 +38,9 @@ class phpbb_auth_provider_apache_test extends phpbb_database_test_case
$driver->set_name($key);
}
- $passwords_helper = new phpbb\passwords\helper;
+ $passwords_helper = new \phpbb\passwords\helper;
// Set up passwords manager
- $passwords_manager = new phpbb\passwords\manager($config, $passwords_drivers, $passwords_helper, 'passwords.driver.bcrypt_2y');
+ $passwords_manager = new \phpbb\passwords\manager($config, $passwords_drivers, $passwords_helper, 'passwords.driver.bcrypt_2y');
$this->provider = new \phpbb\auth\provider\apache($db, $config, $passwords_manager, $this->request, $this->user, $phpbb_root_path, $phpEx);
}
diff --git a/tests/auth/provider_db_test.php b/tests/auth/provider_db_test.php
index 74615a01ed..b979ab34c5 100644
--- a/tests/auth/provider_db_test.php
+++ b/tests/auth/provider_db_test.php
@@ -28,12 +28,12 @@ class phpbb_auth_provider_db_test extends phpbb_database_test_case
));
$request = $this->getMock('\phpbb\request\request');
$user = $this->getMock('\phpbb\user');
- $driver_helper = new phpbb\passwords\driver\helper($config);
+ $driver_helper = new \phpbb\passwords\driver\helper($config);
$passwords_drivers = array(
- 'passwords.driver.bcrypt' => new phpbb\passwords\driver\bcrypt($config, $driver_helper),
- 'passwords.driver.bcrypt_2y' => new phpbb\passwords\driver\bcrypt_2y($config, $driver_helper),
- 'passwords.driver.salted_md5' => new phpbb\passwords\driver\salted_md5($config, $driver_helper),
- 'passwords.driver.phpass' => new phpbb\passwords\driver\phpass($config, $driver_helper),
+ 'passwords.driver.bcrypt' => new \phpbb\passwords\driver\bcrypt($config, $driver_helper),
+ 'passwords.driver.bcrypt_2y' => new \phpbb\passwords\driver\bcrypt_2y($config, $driver_helper),
+ 'passwords.driver.salted_md5' => new \phpbb\passwords\driver\salted_md5($config, $driver_helper),
+ 'passwords.driver.phpass' => new \phpbb\passwords\driver\phpass($config, $driver_helper),
);
foreach ($passwords_drivers as $key => $driver)
@@ -41,9 +41,9 @@ class phpbb_auth_provider_db_test extends phpbb_database_test_case
$driver->set_name($key);
}
- $passwords_helper = new phpbb\passwords\helper;
+ $passwords_helper = new \phpbb\passwords\helper;
// Set up passwords manager
- $passwords_manager = new phpbb\passwords\manager($config, $passwords_drivers, $passwords_helper, 'passwords.driver.bcrypt_2y');
+ $passwords_manager = new \phpbb\passwords\manager($config, $passwords_drivers, $passwords_helper, 'passwords.driver.bcrypt_2y');
$provider = new \phpbb\auth\provider\db($db, $config, $passwords_manager, $request, $user, $phpbb_root_path, $phpEx);
diff --git a/tests/passwords/manager_test.php b/tests/passwords/manager_test.php
index 7e9ec3dfcf..a8dbabf74f 100644
--- a/tests/passwords/manager_test.php
+++ b/tests/passwords/manager_test.php
@@ -26,13 +26,13 @@ class phpbb_passwords_manager_test extends PHPUnit_Framework_TestCase
// Prepare dependencies for manager and driver
$config = new \phpbb\config\config(array());
- $driver_helper = new phpbb\passwords\driver\helper($config);
+ $driver_helper = new \phpbb\passwords\driver\helper($config);
$this->passwords_drivers = array(
- 'passwords.driver.bcrypt' => new phpbb\passwords\driver\bcrypt($config, $driver_helper),
- 'passwords.driver.bcrypt_2y' => new phpbb\passwords\driver\bcrypt_2y($config, $driver_helper),
- 'passwords.driver.salted_md5' => new phpbb\passwords\driver\salted_md5($config, $driver_helper),
- 'passwords.driver.phpass' => new phpbb\passwords\driver\phpass($config, $driver_helper),
+ 'passwords.driver.bcrypt' => new \phpbb\passwords\driver\bcrypt($config, $driver_helper),
+ 'passwords.driver.bcrypt_2y' => new \phpbb\passwords\driver\bcrypt_2y($config, $driver_helper),
+ 'passwords.driver.salted_md5' => new \phpbb\passwords\driver\salted_md5($config, $driver_helper),
+ 'passwords.driver.phpass' => new \phpbb\passwords\driver\phpass($config, $driver_helper),
);
foreach ($this->passwords_drivers as $key => $driver)
@@ -41,9 +41,9 @@ class phpbb_passwords_manager_test extends PHPUnit_Framework_TestCase
$this->phpbb_container->set($key, $driver);
}
- $this->helper = new phpbb\passwords\helper;
+ $this->helper = new \phpbb\passwords\helper;
// Set up passwords manager
- $this->manager = new phpbb\passwords\manager($config, $this->passwords_drivers, $this->helper, 'passwords.driver.bcrypt_2y');
+ $this->manager = new \phpbb\passwords\manager($config, $this->passwords_drivers, $this->helper, 'passwords.driver.bcrypt_2y');
}
public function hash_password_data()
diff --git a/tests/security/hash_test.php b/tests/security/hash_test.php
index b4c4dba48f..76d7d22a00 100644
--- a/tests/security/hash_test.php
+++ b/tests/security/hash_test.php
@@ -15,14 +15,14 @@ class phpbb_security_hash_test extends phpbb_test_case
{
global $phpbb_container;
- $config = new phpbb\config\config(array());
+ $config = new \phpbb\config\config(array());
$phpbb_container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
- $driver_helper = new phpbb\passwords\driver\helper($config);
+ $driver_helper = new \phpbb\passwords\driver\helper($config);
$passwords_drivers = array(
- 'passwords.driver.bcrypt' => new phpbb\passwords\driver\bcrypt($config, $driver_helper),
- 'passwords.driver.bcrypt_2y' => new phpbb\passwords\driver\bcrypt_2y($config, $driver_helper),
- 'passwords.driver.salted_md5' => new phpbb\passwords\driver\salted_md5($config, $driver_helper),
- 'passwords.driver.phpass' => new phpbb\passwords\driver\phpass($config, $driver_helper),
+ 'passwords.driver.bcrypt' => new \phpbb\passwords\driver\bcrypt($config, $driver_helper),
+ 'passwords.driver.bcrypt_2y' => new \phpbb\passwords\driver\bcrypt_2y($config, $driver_helper),
+ 'passwords.driver.salted_md5' => new \phpbb\passwords\driver\salted_md5($config, $driver_helper),
+ 'passwords.driver.phpass' => new \phpbb\passwords\driver\phpass($config, $driver_helper),
);
foreach ($passwords_drivers as $key => $driver)
@@ -30,9 +30,9 @@ class phpbb_security_hash_test extends phpbb_test_case
$driver->set_name($key);
}
- $passwords_helper = new phpbb\passwords\helper;
+ $passwords_helper = new \phpbb\passwords\helper;
// Set up passwords manager
- $passwords_manager = new phpbb\passwords\manager($config, $passwords_drivers, $passwords_helper, 'passwords.driver.bcrypt_2y');
+ $passwords_manager = new \phpbb\passwords\manager($config, $passwords_drivers, $passwords_helper, 'passwords.driver.bcrypt_2y');
$phpbb_container
->expects($this->any())
diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php
index 065227b050..e078b09082 100644
--- a/tests/test_framework/phpbb_functional_test_case.php
+++ b/tests/test_framework/phpbb_functional_test_case.php
@@ -1005,14 +1005,14 @@ class phpbb_functional_test_case extends phpbb_test_case
public function get_passwords_manager()
{
// Prepare dependencies for manager and driver
- $config = new phpbb\config\config(array());
- $driver_helper = new phpbb\passwords\driver\helper($config);
+ $config = new \phpbb\config\config(array());
+ $driver_helper = new \phpbb\passwords\driver\helper($config);
$passwords_drivers = array(
- 'passwords.driver.bcrypt' => new phpbb\passwords\driver\bcrypt($config, $driver_helper),
- 'passwords.driver.bcrypt_2y' => new phpbb\passwords\driver\bcrypt_2y($config, $driver_helper),
- 'passwords.driver.salted_md5' => new phpbb\passwords\driver\salted_md5($config, $driver_helper),
- 'passwords.driver.phpass' => new phpbb\passwords\driver\phpass($config, $driver_helper),
+ 'passwords.driver.bcrypt' => new \phpbb\passwords\driver\bcrypt($config, $driver_helper),
+ 'passwords.driver.bcrypt_2y' => new \phpbb\passwords\driver\bcrypt_2y($config, $driver_helper),
+ 'passwords.driver.salted_md5' => new \phpbb\passwords\driver\salted_md5($config, $driver_helper),
+ 'passwords.driver.phpass' => new \phpbb\passwords\driver\phpass($config, $driver_helper),
);
foreach ($passwords_drivers as $key => $driver)
@@ -1020,9 +1020,9 @@ class phpbb_functional_test_case extends phpbb_test_case
$driver->set_name($key);
}
- $passwords_helper = new phpbb\passwords\helper;
+ $passwords_helper = new \phpbb\passwords\helper;
// Set up passwords manager
- $manager = new phpbb\passwords\manager($config, $passwords_drivers, $passwords_helper, 'passwords.driver.bcrypt_2y');
+ $manager = new \phpbb\passwords\manager($config, $passwords_drivers, $passwords_helper, 'passwords.driver.bcrypt_2y');
return $manager;
}