2018-01-19 16:48:52 -05:00
|
|
|
<?php declare(strict_types=1);
|
|
|
|
/**
|
|
|
|
* Query
|
|
|
|
*
|
|
|
|
* SQL Query Builder / Database Abstraction Layer
|
|
|
|
*
|
2022-09-29 11:33:08 -04:00
|
|
|
* PHP version 8.1
|
2018-01-19 16:48:52 -05:00
|
|
|
*
|
|
|
|
* @package Query
|
2023-01-20 11:30:51 -05:00
|
|
|
* @author Timothy J. Warren <tim@timshome.page>
|
|
|
|
* @copyright 2012 - 2023 Timothy J. Warren
|
2018-01-19 16:48:52 -05:00
|
|
|
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
2019-12-11 16:49:42 -05:00
|
|
|
* @link https://git.timshomepage.net/aviat/Query
|
2023-03-17 16:34:21 -04:00
|
|
|
* @version 4.1.0
|
2018-01-19 16:48:52 -05:00
|
|
|
*/
|
2023-03-17 16:00:56 -04:00
|
|
|
|
2018-01-19 16:48:52 -05:00
|
|
|
namespace Query\Tests;
|
|
|
|
|
2023-03-17 16:00:56 -04:00
|
|
|
use PHPUnit\Framework\TestCase;
|
2018-01-19 16:48:52 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Base class for TestCases
|
|
|
|
*/
|
2023-03-17 16:00:56 -04:00
|
|
|
abstract class BaseTestCase extends TestCase
|
|
|
|
{
|
2018-01-19 16:48:52 -05:00
|
|
|
/**
|
|
|
|
* Wrapper for Simpletest's assertEqual
|
|
|
|
*
|
|
|
|
* @param mixed $expected
|
|
|
|
* @param mixed $actual
|
|
|
|
*/
|
2023-03-17 16:00:56 -04:00
|
|
|
// public function assertEqual($expected, $actual, $message='')
|
|
|
|
// {
|
|
|
|
// $this->assertEquals($expected, $actual, $message);
|
|
|
|
// }
|
2018-01-19 16:48:52 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Wrapper for SimpleTest's assertIsA
|
|
|
|
*/
|
2023-03-17 16:00:56 -04:00
|
|
|
public function assertIsA(mixed $object, string $type, string $message='')
|
2018-01-19 16:48:52 -05:00
|
|
|
{
|
|
|
|
$this->assertTrue(is_a($object, $type), $message);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Implementation of SimpleTest's assertReference
|
|
|
|
*
|
|
|
|
* @param mixed $first
|
|
|
|
* @param mixed $second
|
|
|
|
* @param string $message
|
|
|
|
*/
|
2023-03-17 16:00:56 -04:00
|
|
|
// public function assertReference($first, $second, $message='')
|
|
|
|
// {
|
|
|
|
// if (\is_object($first))
|
|
|
|
// {
|
|
|
|
// $res = ($first === $second);
|
|
|
|
// }
|
|
|
|
// else
|
|
|
|
// {
|
|
|
|
// $temp = $first;
|
|
|
|
// $first = uniqid('test', TRUE);
|
|
|
|
// $isRef = ($first === $second);
|
|
|
|
// $first = $temp;
|
|
|
|
// $res = $isRef;
|
|
|
|
// }
|
|
|
|
// $this->assertTrue($res, $message);
|
|
|
|
// }
|
|
|
|
}
|