RPeraltaJr
10/10/2019 - 9:28 PM

PHPUnit Testing

<?php

declare(strict_types=1);
require_once "vendor/autoload.php";
require_once "includes/db.php";
use PHPUnit\Framework\TestCase;

final class FormSubmissionTest extends TestCase
{

    public function testUploadsDirectoryExists()
    {
        $this->assertDirectoryExists('../_uploads');
    }

    public function testFirstNameExists()
    {
        $faker = Faker\Factory::create();
        $this->assertIsString($faker->firstName);
    }

}