37 lines
752 B
PHP
37 lines
752 B
PHP
<?php
|
|
namespace App\Models;
|
|
|
|
class AccessTest extends \PHPUnit\Framework\TestCase
|
|
{
|
|
/**
|
|
*
|
|
* @test
|
|
*/
|
|
public function databaseInteractionsSuccess()
|
|
{
|
|
$access = new Access();
|
|
|
|
$this->assertTrue($access->showAll());
|
|
|
|
$args = [
|
|
'username' => 'gregorio',
|
|
'password' => 'iniada13charc',
|
|
];
|
|
|
|
$this->assertTrue($access->entry($args));
|
|
|
|
$args = [
|
|
'username' => 'masihgregorio',
|
|
'password' => 'inijuga3belas'
|
|
];
|
|
|
|
$this->assertTrue($access->update($args, 1));
|
|
|
|
$this->assertTrue($access->showSingle(1));
|
|
|
|
$this->assertTrue($access->delete(1));
|
|
|
|
$this->assertTrue($access->dropTable('user'));
|
|
}
|
|
}
|