Improve PHPUNIT
This commit is contained in:
parent
4b84ba4879
commit
003fccf58b
7 changed files with 24 additions and 9 deletions
|
|
@ -28,7 +28,7 @@
|
|||
*/
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
require DIRTEST . '/global.php';
|
||||
|
||||
/**
|
||||
|
|
@ -44,7 +44,7 @@ class Http_InputTest extends TestCase {
|
|||
|
||||
* @return array
|
||||
*/
|
||||
function dataHttpInput() {
|
||||
static function dataHttpInput() {
|
||||
return array(
|
||||
[ ['value'=>'<script'], '<.script']
|
||||
, [['value'=>'Test <script'], 'Test <.script']
|
||||
|
|
@ -63,6 +63,7 @@ class Http_InputTest extends TestCase {
|
|||
* @dataProvider dataHttpInput
|
||||
* @global $g_connection
|
||||
*/
|
||||
#[DataProvider('dataHttpInput')]
|
||||
function testRemoveHarmingString($array,$result) {
|
||||
$http=new \HttpInput();
|
||||
// print "value = ".print_r($value,true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue