PHP Classes

File: tests/Feature/Auth/RegistrationTest.php

Recommend this page to a friend!
  Classes of Maniruzzaman Akash   Laravel Stripe Checkout   tests/Feature/Auth/RegistrationTest.php   Download  
File: tests/Feature/Auth/RegistrationTest.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Laravel Stripe Checkout
E-commerce checkout that uses Stripe to pay orders
Author: By
Last change:
Date: 1 year ago
Size: 532 bytes
 

Contents

Class file image Download
<?php

use App\Providers\RouteServiceProvider;

test('registration screen can be rendered', function () {
   
$response = $this->get('/register');

   
$response->assertStatus(200);
});

test('new users can register', function () {
   
$response = $this->post('/register', [
       
'name' => 'Test User',
       
'email' => 'test@example.com',
       
'password' => 'password',
       
'password_confirmation' => 'password',
    ]);

   
$this->assertAuthenticated();
   
$response->assertRedirect(RouteServiceProvider::HOME);
});