TDD Loop

Adam Wathan – Laracon US 2016 (opens new window)

# Testing

# Create Test

php artisan make:test UserTest

# Running

Run all tests

php artisan test

Run specific test

php artisan test --filter="PostTest"

# Examples

# setup()

private $user;

public function setUp(): void
{
	parent::setUp();

	$this->user = User::factory()->create([
		'email'     => 'admin@admin.com',
		'password'  => bcrypt('password')
	]);
}
Last Updated: 2/4/2022, 12:37:51