Permalink
Browse files

Update test for lowercase headers

  • Loading branch information...
rowanparker committed Nov 16, 2011
1 parent 52ce380 commit d059578c871e4b637552c911c08829389975aad2
Showing with 12 additions and 12 deletions.
  1. +12 −12 tests/phpunit/classes/LitheAuthTest.php
@@ -71,7 +71,7 @@ public function testExceptionThrownOnNoHashProvided()
public function testExceptionThrownOnNoKeyProvided()
{
$request = Request::factory();
- $request->headers('Lithe-hash', 'hash');
+ $request->headers('lithe-hash', 'hash');
Lithe_Auth::authenticate($request);
}
@@ -83,8 +83,8 @@ public function testExceptionThrownOnNoKeyProvided()
public function testExceptionThrownOnNoTimestampProvided()
{
$request = Request::factory();
- $request->headers('Lithe-hash', 'hash');
- $request->headers('Lithe-key', 'test');
+ $request->headers('lithe-hash', 'hash');
+ $request->headers('lithe-key', 'test');
Lithe_Auth::authenticate($request);
}
@@ -96,9 +96,9 @@ public function testExceptionThrownOnNoTimestampProvided()
public function testExceptionThrownOnInvalidHash()
{
$request = Request::factory();
- $request->headers('Lithe-hash', 'hash');
- $request->headers('Lithe-key', 'test');
- $request->headers('Lithe-time', 'time');
+ $request->headers('lithe-hash', 'hash');
+ $request->headers('lithe-key', 'test');
+ $request->headers('lithe-time', 'time');
Lithe_Auth::authenticate($request);
}
@@ -109,9 +109,9 @@ public function testAuthenticate()
{
try {
$request = Request::factory('some/random/uri');
- $request->headers('Lithe-hash', '2678de6689a381b7aa7513769088b6ead1adca0c692df9fd318df6b86b8bbf5dbed68c25eeaa9a47eccce3da3ebf318d84d70e87f984cce7bffed3d4ed1c065e');
- $request->headers('Lithe-key', 'test');
- $request->headers('Lithe-time', '12345');
+ $request->headers('lithe-hash', '2678de6689a381b7aa7513769088b6ead1adca0c692df9fd318df6b86b8bbf5dbed68c25eeaa9a47eccce3da3ebf318d84d70e87f984cce7bffed3d4ed1c065e');
+ $request->headers('lithe-key', 'test');
+ $request->headers('lithe-time', '12345');
Lithe_Auth::authenticate($request);
} catch (Exception $e) {
$this->fail('An unexpected exception occured: ' . $e->getMessage());
@@ -127,8 +127,8 @@ public function testPrepare()
$request = Request::factory('some/random/uri');
Lithe_Auth::prepare($request, $key, $time);
- $this->assertEquals($key, $request->headers('Lithe-key'));
- $this->assertEquals($time, $request->headers('Lithe-time'));
- $this->assertEquals($hash, $request->headers('Lithe-hash'));
+ $this->assertEquals($key, $request->headers('lithe-key'));
+ $this->assertEquals($time, $request->headers('lithe-time'));
+ $this->assertEquals($hash, $request->headers('lithe-hash'));
}
}

0 comments on commit d059578

Please sign in to comment.