Compare commits
6 Commits
552eeb0c25
...
9a59a2563d
Author | SHA1 | Date |
---|---|---|
tracer | 9a59a2563d | |
tracer | 620e762dfc | |
tracer | 5efa996d1d | |
tracer | 82018976cf | |
tracer | 26e2934e40 | |
tracer | b554c751ae |
|
@ -6,3 +6,7 @@
|
||||||
/config.json.local
|
/config.json.local
|
||||||
/bindAPI.log
|
/bindAPI.log
|
||||||
|
|
||||||
|
/reports/
|
||||||
|
/bindAPI.test.log
|
||||||
|
/.phpunit.result.cache
|
||||||
|
/config.json.test
|
||||||
|
|
|
@ -1,48 +1,53 @@
|
||||||
{
|
{
|
||||||
"name": "tracer/bindapi",
|
"name": "tracer/bindapi",
|
||||||
"decription": "fo",
|
"decription": "fo",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Micha Espey",
|
"name": "Micha Espey",
|
||||||
"email": "tracer@24unix.net"
|
"email": "tracer@24unix.net"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"license": "proprietary",
|
"license": "proprietary",
|
||||||
"minimum-stability": "stable",
|
"minimum-stability": "stable",
|
||||||
"prefer-stable": true,
|
"prefer-stable": true,
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=8.1",
|
"php": ">=8.1",
|
||||||
"ext-curl": "*",
|
"ext-curl": "*",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"ext-pdo": "*",
|
"ext-mbstring": "*",
|
||||||
"arubacao/tld-checker": "^1.2",
|
"ext-openssl": "*",
|
||||||
"monolog/monolog": "^3.1",
|
"ext-pdo": "*",
|
||||||
"php-di/php-di": "^6.3",
|
"ext-posix": "*",
|
||||||
"phplucidframe/console-table": "^1.2",
|
"ext-sodium": "*",
|
||||||
"zircote/swagger-php": "^4.2",
|
"arubacao/tld-checker": "^1.2",
|
||||||
"ext-posix": "*",
|
"monolog/monolog": "^3.1",
|
||||||
"ext-openssl": "*"
|
"netresearch/jsonmapper": "^4.0",
|
||||||
},
|
"php-di/php-di": "^6.3",
|
||||||
"config": {
|
"phplucidframe/console-table": "^1.2",
|
||||||
"optimize-autoloader": true,
|
"symfony/property-access": "^6.1",
|
||||||
"preferred-install": {
|
"symfony/serializer": "^6.1",
|
||||||
"*": "dist"
|
"zircote/swagger-php": "^4.2"
|
||||||
},
|
},
|
||||||
"sort-packages": true
|
"config": {
|
||||||
|
"optimize-autoloader": true,
|
||||||
|
"preferred-install": {
|
||||||
|
"*": "dist"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"sort-packages": true
|
||||||
"psr-4": {
|
},
|
||||||
"App\\": "src/"
|
"autoload": {
|
||||||
}
|
"psr-4": {
|
||||||
},
|
"App\\": "src/"
|
||||||
"autoload-dev": {
|
}
|
||||||
"psr-4": {
|
},
|
||||||
"Src\\": "src/"
|
"autoload-dev": {
|
||||||
}
|
"psr-4": {
|
||||||
},
|
"Src\\": "src/"
|
||||||
"require-dev": {
|
}
|
||||||
"escapestudios/symfony2-coding-standard": "3.x-dev",
|
},
|
||||||
"phpunit/phpunit": "^9.5"
|
"require-dev": {
|
||||||
}
|
"escapestudios/symfony2-coding-standard": "3.x-dev",
|
||||||
|
"phpunit/phpunit": "^9.5"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
27
phpunit.xml
27
phpunit.xml
|
@ -1,8 +1,27 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<phpunit bootstrap="vendor/autoload.php">
|
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
|
||||||
|
bootstrap="vendor/autoload.php"
|
||||||
|
cacheResultFile=".phpunit.cache/test-results"
|
||||||
|
executionOrder="depends,defects"
|
||||||
|
forceCoversAnnotation="false"
|
||||||
|
beStrictAboutCoversAnnotation="true"
|
||||||
|
beStrictAboutOutputDuringTests="true"
|
||||||
|
beStrictAboutTodoAnnotatedTests="true"
|
||||||
|
convertDeprecationsToExceptions="true"
|
||||||
|
failOnRisky="true"
|
||||||
|
failOnWarning="true"
|
||||||
|
verbose="true">
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="bindAPI Test Suite">
|
<testsuite name="default">
|
||||||
<directory suffix=".php">./tests/</directory>
|
<directory>tests</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
</phpunit>
|
|
||||||
|
<coverage cacheDirectory=".phpunit.cache/code-coverage"
|
||||||
|
processUncoveredFiles="true">
|
||||||
|
<include>
|
||||||
|
<directory suffix=".php">src</directory>
|
||||||
|
</include>
|
||||||
|
</coverage>
|
||||||
|
</phpunit>
|
||||||
|
|
|
@ -11,14 +11,13 @@ use PDOException;
|
||||||
* @covers \App\Controller\DatabaseConnection
|
* @covers \App\Controller\DatabaseConnection
|
||||||
* @covers \App\Controller\ConfigController
|
* @covers \App\Controller\ConfigController
|
||||||
*/
|
*/
|
||||||
class DatabaseConnectionTest extends BindApiTestController
|
class DatabaseConnectionTest extends BindApiControllerTest
|
||||||
{
|
{
|
||||||
private PDO $dbConnection;
|
private PDO $dbConnection;
|
||||||
|
|
||||||
public function testGetConnection()
|
public function testGetConnection()
|
||||||
{
|
{
|
||||||
|
$configController = new ConfigController(test: true);
|
||||||
$configController = new ConfigController(test: true);
|
|
||||||
|
|
||||||
$dbHost = $configController->getConfig(configKey: 'dbHost');
|
$dbHost = $configController->getConfig(configKey: 'dbHost');
|
||||||
$dbPort = $configController->getConfig(configKey: 'dbPort');
|
$dbPort = $configController->getConfig(configKey: 'dbPort');
|
||||||
|
|
|
@ -7,22 +7,22 @@ use PHPUnit\Framework\TestCase;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class NameserverControllerTest extends TestCase
|
class NameserverControllerTest extends BindApiControllerTest
|
||||||
{
|
{
|
||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
//$this->fixture =
|
//$this->fixture =
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function tearDown(): void
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function testUpdate()
|
public function testUpdate()
|
||||||
{
|
{
|
||||||
|
self::assertEquals(expected: true, actual: true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Unit\Controller;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class RequestControllerTest extends BindApiControllerTest
|
||||||
|
{
|
||||||
|
|
||||||
|
public function setUp(): void
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function tearDown(): void
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue