Include tests/configTest.php

Add lib/device.php
Fixup lib/resolve.php

Signed-off-by: Diederik de Groot <dkgroot@talon.nl>
This commit is contained in:
Diederik de Groot
2020-03-20 11:23:32 +01:00
parent 3e9f731e9a
commit fcf7e52370
2 changed files with 229 additions and 0 deletions

25
tests/configTest.php Normal file
View File

@@ -0,0 +1,25 @@
<?php declare(strict_types=1);
use PHPUnit\Framework\TestCase;
include_once "lib/config.php";
use SCCP\Config as Config;
final class ConfigTest extends TestCase
{
public function testCanBeCreated(): void
{
global $base_path;
$configParser = new Config\ConfigParser($base_path, "config.ini");
$this->assertInstanceOf(
Config\ConfigParser::class,
$configParser
);
}
public function testCanGetConfig(): void
{
global $base_path;
$configParser = new Config\ConfigParser($base_path, "config.ini");
$config = $configParser->getConfiguration();
$this->assertNotEmpty($config);
}
}