Commit ea4c26f7 authored by Marc Egger's avatar Marc Egger
Browse files

add BindParamTest.php and bootstrap.php again since it did not work

parent 7cdbf57c
Pipeline #1158 failed with stage
in 1 minute and 33 seconds
<?php
/**
* Created by PhpStorm.
* User: megger
* Date: 12/17/18
* Time: 12:17 PM
*/
require_once(__DIR__ . '/../vendor/autoload.php');
/*
spl_autoload_register(function ($class) {
$tmp = explode('\\', $class);
$className = array_pop($tmp);
$file = __DIR__ . '/qfq/helper/' . $className . '.php';
if (file_exists($file))
{
require_once $file;
}
});
*/
<?php
/**
* Created by PhpStorm.
* User: megger
* Date: 12/17/18
* Time: 9:14 AM
*/
namespace qfq;
use PHPUnit\Framework\TestCase;
require_once(__DIR__ . '/../../../bootstrap.php');
class BindParamTest extends TestCase {
/**
* @covers \qfq\BindParam
*/
public function testParamInitiallyEmptyString() {
$bp = new BindParam;
$this->assertEquals([''], $bp->get());
return $bp;
}
/**
* @covers \qfq\BindParam::add
* @covers \qfq\BindParam::get
* @depends testParamInitiallyEmptyString
*/
public function testAddValues($bp) {
$valInt = 1;
$bp->add($valInt);
$this->assertEquals(['i', 1], $bp->get());
$valStr = 'a';
$bp->add($valStr);
$this->assertEquals(['is', 1, 'a'], $bp->get());
}
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment