Skip to content

Instantly share code, notes, and snippets.

@Mulkave
Created June 8, 2016 21:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mulkave/a46d84f2d68eb48cb5c58acd60874e1a to your computer and use it in GitHub Desktop.
Save Mulkave/a46d84f2d68eb48cb5c58acd60874e1a to your computer and use it in GitHub Desktop.
<?php
namespace Directory\Services\Site\Tests\Features;
use Faker\Factory as Faker;
use Directory\Foundation\TestCase;
use Illuminate\Foundation\Testing\WithoutMiddleware;
class RegisterCitizenFeatureTest extends TestCase
{
use WithoutMiddleware;
public function test_registering_citizen()
{
$fake = Faker::create();
$name = $fake->name;
$email = $fake->email;
$ssn = $fake->randomNumber;
$occupation = $fake->word;
$address = $fake->address;
$this->post('/site/citizens', [
'name' => $name,
'email' => $email,
'ssn' => $ssn,
'occupation' => $occupation,
'address' => $address,
])->seeJson([
'name' => $name,
'email' => $email,
'ssn' => $ssn,
'occupation' => $occupation,
'address' => $address,
]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment