Skip to content

Instantly share code, notes, and snippets.

@uno-de-piera
Created May 31, 2020 08:52
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 uno-de-piera/6af129841e5af34787c115ba4a8495fd to your computer and use it in GitHub Desktop.
Save uno-de-piera/6af129841e5af34787c115ba4a8495fd to your computer and use it in GitHub Desktop.
<?php
/**
* @group framework-page
*/
public function testCheckCanSubmitFormFrameworkPage()
{
factory(User::class, 1)->create();
Framework::create(['name' => 'Php']);
$this->browse(function (Browser $browser)
{
$browser->loginAs(User::find(1))
->visit(new \Tests\Browser\Pages\Framework)
->press('Save Framework')
->assertSee('The name field is required.')
->createFramework('Laravel')
->assertSee('Framework guardado correctamente')
->createFramework('Laravel')
->assertSee('The name has already been taken.');
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment