PHP Classes

File: tests/Feature/Auth/RegistrationTest.php

Recommend this page to a friend!
  Classes of Stanley Aloh   Inventory Assignment   tests/Feature/Auth/RegistrationTest.php   Download  
File: tests/Feature/Auth/RegistrationTest.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Inventory Assignment
Manage the inventory of stored products
Author: By
Last change:
Date: 25 days ago
Size: 500 bytes
 

Contents

Class file image Download
<?php

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' => '[email protected]',
       
'password' => 'password',
       
'password_confirmation' => 'password',
    ]);

   
$this->assertAuthenticated();
   
$response->assertRedirect(route('dashboard', absolute: false));
});