diff options
author | Josh Hoyt <josh@janrain.com> | 2006-01-26 22:11:39 +0000 |
---|---|---|
committer | Josh Hoyt <josh@janrain.com> | 2006-01-26 22:11:39 +0000 |
commit | 29d1d32b2ffd6e3bd61395dfae595ae0586cbb1e (patch) | |
tree | e80db73a7f7f735dd44981cec7d1be799060c321 /Tests/Auth | |
parent | 96f3f6e8a0eaed9fadabfbc284ef1ee3a8a64372 (diff) | |
download | php-openid-29d1d32b2ffd6e3bd61395dfae595ae0586cbb1e.zip php-openid-29d1d32b2ffd6e3bd61395dfae595ae0586cbb1e.tar.gz php-openid-29d1d32b2ffd6e3bd61395dfae595ae0586cbb1e.tar.bz2 |
[project @ Use common data file reader function in hmacsha1 test]
Diffstat (limited to 'Tests/Auth')
-rw-r--r-- | Tests/Auth/OpenID/HMACSHA1.php | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Tests/Auth/OpenID/HMACSHA1.php b/Tests/Auth/OpenID/HMACSHA1.php index a049bdf..4c532a0 100644 --- a/Tests/Auth/OpenID/HMACSHA1.php +++ b/Tests/Auth/OpenID/HMACSHA1.php @@ -16,6 +16,7 @@ require_once 'PHPUnit.php'; require_once 'Auth/OpenID/HMACSHA1.php'; +require_once 'Tests/Auth/OpenID/Util.php'; class Tests_Auth_OpenID_HMACSHA1_TestCase extends PHPUnit_TestCase { function Tests_Auth_OpenID_HMACSHA1_TestCase( @@ -58,15 +59,7 @@ class Tests_Auth_OpenID_HMACSHA1 extends PHPUnit_TestSuite { function _readTestCases() { - $path = dirname(realpath(__FILE__)); - $hmac_test_data_file = $path . DIRECTORY_SEPARATOR . 'hmac.txt'; - $lines = file($hmac_test_data_file); - if ($lines === false) { - trigger_error("Failed to open data file: $dh_test_data_file", - E_USER_ERROR); - return false; - } - + $lines = Tests_Auth_OpenID_readlines('hmac.txt'); $cases = array(); $case = array(); foreach ($lines as $line) { |