Suppress PHPMD messages and make sure to use route() [skip ci]

This commit is contained in:
James Cole
2019-06-09 09:39:56 +02:00
parent 57cfd7e3bc
commit a1929b0521
16 changed files with 93 additions and 45 deletions

View File

@@ -60,6 +60,9 @@ use Tests\TestCase;
/**
* Class CurrencyControllerTest
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
* @SuppressWarnings(PHPMD.TooManyPublicMethods)
*/
class CurrencyControllerTest extends TestCase
{
@@ -108,7 +111,7 @@ class CurrencyControllerTest extends TestCase
];
// test API
$response = $this->post('/api/v1/currencies', $data, ['Accept' => 'application/json']);
$response = $this->post(route('api.v1.currencies.store'), $data, ['Accept' => 'application/json']);
$response->assertStatus(200);
$response->assertJson(['data' => ['type' => 'currencies', 'links' => true],]);
$response->assertHeader('Content-Type', 'application/vnd.api+json');
@@ -153,7 +156,7 @@ class CurrencyControllerTest extends TestCase
];
// test API
$response = $this->post('/api/v1/currencies', $data, ['Accept' => 'application/json']);
$response = $this->post(route('api.v1.currencies.store'), $data, ['Accept' => 'application/json']);
$response->assertStatus(200);
$response->assertJson(['data' => ['type' => 'currencies', 'links' => true],]);
$response->assertHeader('Content-Type', 'application/vnd.api+json');