Commit d166aaa6 authored by Karamel's avatar Karamel
Browse files

Fix general input failure tests with various database systems

parent 9d3af517
......@@ -517,7 +517,8 @@ class HttpCashSessionTest extends TestCase
$this->assertEquals(400, curl_getinfo($this->curl, CURLINFO_HTTP_CODE));
// Check that the failure is registered
$ftkts = $this->dao->search(FiscalTicket::class,
new DAOCondition('sequence', '=', FiscalTicket::getGeneralFailureSequence()));
new DAOCondition('sequence', '=', FiscalTicket::getGeneralFailureSequence()),
null, null, '-number');
$this->assertEquals(2, count($ftkts));
$ftkt = $ftkts[0];
$fail = json_decode($ftkt->getContent(), true);
......@@ -545,7 +546,7 @@ class HttpCashSessionTest extends TestCase
$this->assertEquals('openCash', $err['field']);
// Check that the fiscal ticket is registered
$ftkts = $this->dao->search(FiscalTicket::class,
new DAOCondition('sequence', '=', FiscalTicket::getGeneralFailureSequence()));
new DAOCondition('sequence', '=', FiscalTicket::getGeneralFailureSequence()), null, null, '-number');
$this->assertEquals(2, count($ftkts));
$ftkt = $ftkts[0];
$fail = json_decode($ftkt->getContent(), true);
......
......@@ -470,7 +470,8 @@ class HttpTicketTest extends TestCase
$this->assertEquals(400, curl_getinfo($this->curl, CURLINFO_HTTP_CODE));
// Check that the failure is registered
$ftkts = $this->dao->search(FiscalTicket::class,
new DAOCondition('sequence', '=', FiscalTicket::getGeneralFailureSequence()));
new DAOCondition('sequence', '=', FiscalTicket::getGeneralFailureSequence()),
null, null, '-number');
$this->assertEquals(2, count($ftkts));
$ftkt = $ftkts[0];
$fail = json_decode($ftkt->getContent(), true);
......@@ -505,7 +506,8 @@ class HttpTicketTest extends TestCase
$this->assertEquals('paymentMode', $err['field']);
// Check that the fiscal ticket is registered
$ftkts = $this->dao->search(FiscalTicket::class,
new DAOCondition('sequence', '=', FiscalTicket::getGeneralFailureSequence()));
new DAOCondition('sequence', '=', FiscalTicket::getGeneralFailureSequence()),
null, null, '-number');
$this->assertEquals(2, count($ftkts));
$ftkt = $ftkts[0];
$fail = json_decode($ftkt->getContent(), true);
......
Markdown is supported
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