replace database abstraction DB with PDO

This commit is contained in:
marc tobias
2019-02-24 16:14:36 +01:00
parent b20a534e0c
commit d4b633bfc5
42 changed files with 499 additions and 255 deletions

View File

@@ -56,9 +56,18 @@ class TokenTest extends \PHPUnit\Framework\TestCase
{
$this->expectOutputRegex('/<p><tt>/');
$oDbStub = $this->getMockBuilder(\DB::class)
->setMethods(array('getAll'))
$oDbStub = $this->getMockBuilder(Nominatim\DB::class)
->setMethods(array('getAll', 'getDBQuotedList'))
->getMock();
$oDbStub->method('getDBQuotedList')
->will($this->returnCallback(function ($aVals) {
return array_map(function ($sVal) {
return "'".$sVal."'";
}, $aVals);
}));
$oDbStub->method('getAll')
->will($this->returnCallback(function ($sql) {
$aResults = array();