Skip to content

Commit

Permalink
Change config constant name to be package specific
Browse files Browse the repository at this point in the history
  • Loading branch information
baileylo committed May 5, 2012
1 parent d5930e2 commit 2a27d97
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions phpunit.xml
Expand Up @@ -19,7 +19,7 @@
</testsuites> </testsuites>
<php> <php>
<includePath>lib/HTTP2</includePath> <includePath>lib/HTTP2</includePath>
<const name="TEST_URL" value="http://local/www/mike/pear/HTTP_Header2/tests/response.php'"/> <const name="HTTP_HEADER2_TEST_URL" value="http://local/www/mike/pear/HTTP_Header2/tests/response.php'"/>
<const name="CACHE_TEST_URL" value="http://local/www/mike/pear/HTTP_Header2/tests/cacheresponse.php"/> <const name="HTTP_HEADER2_CACHE_TEST_URL" value="http://local/www/mike/pear/HTTP_Header2/tests/cacheresponse.php"/>
</php> </php>
</phpunit> </phpunit>
6 changes: 3 additions & 3 deletions tests/HTTP_Header2Test.php
Expand Up @@ -73,7 +73,7 @@ function testgetHeader()


function testsendHeaders() function testsendHeaders()
{ {
$url = new Net_URL2(TEST_URL); $url = new Net_URL2(HTTP_HEADER2_TEST_URL);
$url->setQueryVariable('X-Foo', 'blablubb'); $url->setQueryVariable('X-Foo', 'blablubb');


$r = new HTTP_Request2($url); $r = new HTTP_Request2($url);
Expand All @@ -85,7 +85,7 @@ function testsendHeaders()


function testsendStatusCode() function testsendStatusCode()
{ {
$url = new Net_URL2(TEST_URL); $url = new Net_URL2(HTTP_HEADER2_TEST_URL);
$r = new HTTP_Request2($url); $r = new HTTP_Request2($url);


$r->setMethod(HTTP_Request2::METHOD_GET); $r->setMethod(HTTP_Request2::METHOD_GET);
Expand All @@ -108,7 +108,7 @@ function testdateToTimestamp()


function testredirect() function testredirect()
{ {
$url = new Net_URL2(TEST_URL); $url = new Net_URL2(HTTP_HEADER2_TEST_URL);
$url->setQueryVariable('redirect', 'response.php?abc=123'); $url->setQueryVariable('redirect', 'response.php?abc=123');


$r = new HTTP_Request2($url); $r = new HTTP_Request2($url);
Expand Down
8 changes: 4 additions & 4 deletions tests/HTTP_Header2_CacheTest.php
Expand Up @@ -46,7 +46,7 @@ function testexitIfCached()
{ {
$http = new HTTP2(); $http = new HTTP2();


$r = new HTTP_Request2(CACHE_TEST_URL); $r = new HTTP_Request2(HTTP_HEADER2_CACHE_TEST_URL);
$r->setMethod(HTTP_Request2::METHOD_GET); $r->setMethod(HTTP_Request2::METHOD_GET);
$r->setHeader('If-Modified-Since', $http->date()); $r->setHeader('If-Modified-Since', $http->date());
$response = $r->send(); $response = $r->send();
Expand All @@ -59,7 +59,7 @@ function testexitIfCached()


function testget() function testget()
{ {
$r = new HTTP_Request2(CACHE_TEST_URL); $r = new HTTP_Request2(HTTP_HEADER2_CACHE_TEST_URL);
$r->setMethod(HTTP_Request2::METHOD_GET); $r->setMethod(HTTP_Request2::METHOD_GET);
$response = $r->send(); $response = $r->send();
$this->assertEquals(200, $response->getStatus(), 'HTTP 200 Ok (simple plain GET)'); $this->assertEquals(200, $response->getStatus(), 'HTTP 200 Ok (simple plain GET)');
Expand All @@ -72,7 +72,7 @@ function testget()


function testhead() function testhead()
{ {
$r = new HTTP_Request2(CACHE_TEST_URL); $r = new HTTP_Request2(HTTP_HEADER2_CACHE_TEST_URL);
$r->setMethod(HTTP_Request2::METHOD_HEAD); $r->setMethod(HTTP_Request2::METHOD_HEAD);
$response = $r->send(); $response = $r->send();
$this->assertEquals(200, $response->getStatus(), 'HTTP 200 Ok (simple plain GET)'); $this->assertEquals(200, $response->getStatus(), 'HTTP 200 Ok (simple plain GET)');
Expand All @@ -87,7 +87,7 @@ function testpost()
{ {
$http = new HTTP2(); $http = new HTTP2();


$r = new HTTP_Request2(CACHE_TEST_URL); $r = new HTTP_Request2(HTTP_HEADER2_CACHE_TEST_URL);
$r->setMethod(HTTP_Request2::METHOD_GET); $r->setMethod(HTTP_Request2::METHOD_GET);
$response = $r->send(); $response = $r->send();
$lm = $response->getHeader('last-modified'); $lm = $response->getHeader('last-modified');
Expand Down

0 comments on commit 2a27d97

Please sign in to comment.