Skip to content

Commit

Permalink
remove host from test request
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Jan 6, 2018
1 parent bbaa693 commit 2471cab
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions tests/Api/Todo/CollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class CollectionTest extends ApiTestCase
{
public function testDocumentation()
{
$response = $this->sendRequest('http://127.0.0.1/doc/*/todo', 'GET', [
$response = $this->sendRequest('/doc/*/todo', 'GET', [
'User-Agent' => 'Fusio TestCase',
]);

Expand Down Expand Up @@ -156,7 +156,7 @@ public function testDocumentation()

public function testGet()
{
$response = $this->sendRequest('http://127.0.0.1/todo', 'GET', [
$response = $this->sendRequest('/todo', 'GET', [
'User-Agent' => 'Fusio TestCase',
]);

Expand Down Expand Up @@ -273,7 +273,7 @@ public function testGet()
public function testPost()
{
$body = json_encode(['title' => 'foo']);
$response = $this->sendRequest('http://127.0.0.1/todo', 'POST', [
$response = $this->sendRequest('/todo', 'POST', [
'User-Agent' => 'Fusio TestCase',
'Authorization' => 'Bearer da250526d583edabca8ac2f99e37ee39aa02a3c076c0edc6929095e20ca18dcf'
], $body);
Expand Down Expand Up @@ -304,7 +304,7 @@ public function testPost()
public function testPostInvalidPayload()
{
$body = json_encode(['foo' => 'foo']);
$response = $this->sendRequest('http://127.0.0.1/todo', 'POST', [
$response = $this->sendRequest('/todo', 'POST', [
'User-Agent' => 'Fusio TestCase',
'Authorization' => 'Bearer da250526d583edabca8ac2f99e37ee39aa02a3c076c0edc6929095e20ca18dcf'
], $body);
Expand All @@ -325,7 +325,7 @@ public function testPostInvalidPayload()
public function testPostWithoutAuthorization()
{
$body = json_encode(['title' => 'foo']);
$response = $this->sendRequest('http://127.0.0.1/todo', 'POST', [
$response = $this->sendRequest('/todo', 'POST', [
'User-Agent' => 'Fusio TestCase',
], $body);

Expand All @@ -344,7 +344,7 @@ public function testPostWithoutAuthorization()

public function testPut()
{
$response = $this->sendRequest('http://127.0.0.1/todo', 'PUT', [
$response = $this->sendRequest('/todo', 'PUT', [
'User-Agent' => 'Fusio TestCase',
]);

Expand All @@ -363,7 +363,7 @@ public function testPut()

public function testDelete()
{
$response = $this->sendRequest('http://127.0.0.1/todo', 'DELETE', [
$response = $this->sendRequest('/todo', 'DELETE', [
'User-Agent' => 'Fusio TestCase',
]);

Expand Down
12 changes: 6 additions & 6 deletions tests/Api/Todo/EntityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class EntityTest extends ApiTestCase
{
public function testDocumentation()
{
$response = $this->sendRequest('http://127.0.0.1/doc/*/todo/4', 'GET', [
$response = $this->sendRequest('/doc/*/todo/4', 'GET', [
'User-Agent' => 'Fusio TestCase',
]);

Expand Down Expand Up @@ -146,7 +146,7 @@ public function testDocumentation()

public function testGet()
{
$response = $this->sendRequest('http://127.0.0.1/todo/4', 'GET', [
$response = $this->sendRequest('/todo/4', 'GET', [
'User-Agent' => 'Fusio TestCase',
]);

Expand All @@ -167,7 +167,7 @@ public function testGet()

public function testPost()
{
$response = $this->sendRequest('http://127.0.0.1/todo/4', 'POST', [
$response = $this->sendRequest('/todo/4', 'POST', [
'User-Agent' => 'Fusio TestCase',
]);

Expand All @@ -186,7 +186,7 @@ public function testPost()

public function testPut()
{
$response = $this->sendRequest('http://127.0.0.1/todo/4', 'PUT', [
$response = $this->sendRequest('/todo/4', 'PUT', [
'User-Agent' => 'Fusio TestCase',
]);

Expand All @@ -205,7 +205,7 @@ public function testPut()

public function testDelete()
{
$response = $this->sendRequest('http://127.0.0.1/todo/4', 'DELETE', [
$response = $this->sendRequest('/todo/4', 'DELETE', [
'User-Agent' => 'Fusio TestCase',
'Authorization' => 'Bearer da250526d583edabca8ac2f99e37ee39aa02a3c076c0edc6929095e20ca18dcf'
]);
Expand Down Expand Up @@ -235,7 +235,7 @@ public function testDelete()

public function testDeleteWithoutAuthorization()
{
$response = $this->sendRequest('http://127.0.0.1/todo/4', 'DELETE', [
$response = $this->sendRequest('/todo/4', 'DELETE', [
'User-Agent' => 'Fusio TestCase',
]);

Expand Down

0 comments on commit 2471cab

Please sign in to comment.