Skip to content

Commit

Permalink
Add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
n.zeinali committed Jun 28, 2023
1 parent a0f79f3 commit 624d9b7
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tests/Feature/MappingTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

namespace Tests\Feature;

use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Tests\TestCase;

class MappingTest extends TestCase
{
/**
* A basic feature test example.
*/
public function test_successfulMappingRouteWithXML(): void
{
$correctValue = '{"fullname":"Nafiseh Zeinali","username":"nafi3"}';
$response = $this->get('/data-mapping/xml');
$response->assertStatus(200);
$this->assertJson($correctValue);
}
public function test_successfulMappingRouteWithJson(): void
{
$correctValue = '{"fullname":"Nafiseh Zeinali","username":"nafi3"}';
$response = $this->get('/data-mapping/json');
$response->assertStatus(200);
$this->assertJson($correctValue);
}


}

0 comments on commit 624d9b7

Please sign in to comment.