Update PHPunit tests
This commit is contained in:
@@ -11,7 +11,7 @@ use PHPUnit\Framework\TestCase;
|
|||||||
* @coversDefaultClass \CoreLibs\Check\PHPVersion
|
* @coversDefaultClass \CoreLibs\Check\PHPVersion
|
||||||
* @testdox \CoreLibs\Check\PHPVersion method tests
|
* @testdox \CoreLibs\Check\PHPVersion method tests
|
||||||
*/
|
*/
|
||||||
final class CoreLibsCheckPHPVersionTest extends TestCase
|
final class CoreLibsCheckPhpVersionTest extends TestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* NOTE: The checks must be adapted to the PHP version or they will fail
|
* NOTE: The checks must be adapted to the PHP version or they will fail
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ use PHPUnit\Framework\TestCase;
|
|||||||
* @coversDefaultClass \CoreLibs\Convert\Json
|
* @coversDefaultClass \CoreLibs\Convert\Json
|
||||||
* @testdox \CoreLibs\Convert\Json method tests
|
* @testdox \CoreLibs\Convert\Json method tests
|
||||||
*/
|
*/
|
||||||
final class CoreLibsCheckJsonTest extends TestCase
|
final class CoreLibsConvertJsonTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2646,7 +2646,8 @@ final class CoreLibsDBIOTest extends TestCase
|
|||||||
'level' => 'error',
|
'level' => 'error',
|
||||||
'id' => '51',
|
'id' => '51',
|
||||||
'error' => 'Max query call needs to be set to at least 1',
|
'error' => 'Max query call needs to be set to at least 1',
|
||||||
'source' => 'main::run::run::run::run::run::run::runBare::runTest::testDbErrorHandling::dbSetMaxQueryCall',
|
// run:: can be +1 if called in set and not direct
|
||||||
|
'source' => "/^main::run::run::run::run::run::run::(run::)?runBare::runTest::testDbErrorHandling::dbSetMaxQueryCall$/",
|
||||||
'pg_error' => '',
|
'pg_error' => '',
|
||||||
'msg' => '',
|
'msg' => '',
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php // phpcs:disable Generic.Files.LineLength
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
@@ -255,18 +255,27 @@ final class CoreLibsDebugSupportTest extends TestCase
|
|||||||
* Undocumented function
|
* Undocumented function
|
||||||
*
|
*
|
||||||
* @cover ::getCallerMethodList
|
* @cover ::getCallerMethodList
|
||||||
* @testWith [["main", "run", "run", "run", "run", "run", "run", "runBare", "runTest", "testGetCallerMethodList"]]
|
* @testWith [["main", "run", "run", "run", "run", "run", "run", "runBare", "runTest", "testGetCallerMethodList"],["main", "run", "run", "run", "run", "run", "run", "run", "runBare", "runTest", "testGetCallerMethodList"]]
|
||||||
* @testdox getCallerMethodList check if it returns $expected [$_dataName]
|
* @testdox getCallerMethodList check if it returns $expected [$_dataName]
|
||||||
*
|
*
|
||||||
* @param array $expected
|
* @param array $expected
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testGetCallerMethodList(array $expected): void
|
public function testGetCallerMethodList(array $expected, array $expected_group): void
|
||||||
{
|
{
|
||||||
$this->assertEquals(
|
$compare = \CoreLibs\Debug\Support::getCallerMethodList();
|
||||||
$expected,
|
// if we direct call we have 10, if we call as folder we get 11
|
||||||
\CoreLibs\Debug\Support::getCallerMethodList()
|
if (count($compare) == 10) {
|
||||||
);
|
$this->assertEquals(
|
||||||
|
$expected,
|
||||||
|
\CoreLibs\Debug\Support::getCallerMethodList()
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
$this->assertEquals(
|
||||||
|
$expected_group,
|
||||||
|
\CoreLibs\Debug\Support::getCallerMethodList()
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user