Modify Model set functions to abstract, create Access interactions, do test.

This commit is contained in:
2017-08-31 15:54:50 +07:00
parent 031a188f5b
commit 836a4d8995
3 changed files with 192 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
<?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'));
}
}