Add registration configuration and remove old test files

This commit is contained in:
netkas 2024-10-25 13:37:09 -04:00
parent d2eaa1fe73
commit 02b5afe4c0
3 changed files with 178 additions and 38 deletions

View file

@ -1,38 +0,0 @@
<?php
namespace Socialbox\Classes;
use PHPUnit\Framework\TestCase;
/**
* Socialbox's Configuration Test Class
*
* This is a test suite for testing the "getConfiguration" method in the "Configuration" class.
*/
class ConfigurationTest extends TestCase
{
/**
* Test the "getConfiguration" method in "Configuration" class.
*/
public function testGetConfiguration(): void
{
$config = Configuration::getConfiguration();
$this->assertIsArray($config, "Configuration should be an array.");
//Assert that all the default configuration exists
$this->assertArrayHasKey('host', $config['database']);
$this->assertIsString($config['database']['host']);
$this->assertArrayHasKey('port', $config['database']);
$this->assertIsInt($config['database']['port'], 3306);
$this->assertArrayHasKey('username', $config['database']);
$this->assertIsString($config['database']['username']);
$this->assertArrayHasKey('password', $config['database']);
$this->assertIsString($config['database']['password']);
$this->assertArrayHasKey('name', $config['database']);
$this->assertIsString($config['database']['name']);
}
}