50e4b40721
- Separate non-static router class - Moved some setup code to new method, Core::init - Persistent database connection between tests
16 lines
299 B
PHP
16 lines
299 B
PHP
<?php
|
|
abstract class AbstractMocker implements IMocker
|
|
{
|
|
public function mockMultiple($number = null)
|
|
{
|
|
return Core::getDatabase()->transaction(function() use ($number)
|
|
{
|
|
$ret = [];
|
|
foreach (range(1, $number) as $_)
|
|
{
|
|
$ret []= $this->mockSingle();
|
|
}
|
|
return $ret;
|
|
});
|
|
}
|
|
}
|