<?php
namespace App\Models;

class AccessTest extends \PHPUnit\Framework\TestCase
{
    /**
     *
     * @test
     */
    public function databaseInteractionsSuccess()
    {
        $access = new Access();

        $this->assertTrue($access->showAll());

        $user_entry = [
            'username' => 'gregorio',
            'password' => 'iniada13charc',
        ];

        $this->assertTrue($access->entry('user', $user_entry));

        $user_update = [
            'username' => 'masihgregorio',
            'password' => 'inijuga3belas'
        ];

        $this->assertTrue($access->update('user', $user_update, 1));

        $this->assertTrue($access->showSingle(1));

        $this->assertTrue($access->delete('user', 1));

        $this->assertTrue($access->dropTable('user'));
    }
}
