Added tests for the Store (MySQL and PostgreSQL).
This commit is contained in:
parent
9fc73577ca
commit
42a8316479
14 changed files with 590 additions and 181 deletions
|
|
@ -512,7 +512,7 @@ class Project extends Model
|
|||
}
|
||||
|
||||
$order = ['id' => 'DESC'];
|
||||
$builds = Store\Factory::getStore('Build')->getWhere($criteria, 1, 0, [], $order);
|
||||
$builds = Store\Factory::getStore('Build')->getWhere($criteria, 1, 0, $order);
|
||||
|
||||
if (is_array($builds['items']) && count($builds['items'])) {
|
||||
$latest = array_shift($builds['items']);
|
||||
|
|
@ -536,7 +536,7 @@ class Project extends Model
|
|||
{
|
||||
$criteria = ['branch' => $branch, 'project_id' => $this->getId()];
|
||||
$order = ['id' => 'DESC'];
|
||||
$builds = Store\Factory::getStore('Build')->getWhere($criteria, 1, 1, [], $order);
|
||||
$builds = Store\Factory::getStore('Build')->getWhere($criteria, 1, 1, $order);
|
||||
|
||||
if (is_array($builds['items']) && count($builds['items'])) {
|
||||
$previous = array_shift($builds['items']);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue