0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-19 19:22:14 +02:00

see #161 and #87 - unit test that seems to trigger this bug

This commit is contained in:
David Goodwin 2019-09-15 21:11:20 +01:00
parent f36ba9b4c2
commit 71e7859c91

View File

@ -0,0 +1,32 @@
<?php
class CreatePageBrowserTest extends \PHPUnit\Framework\TestCase {
public function testBasic() {
global $CONF;
$CONF['page_size'] = 5;
// insert some data.
foreach (range(1,10) as $i) {
$username = 'pbt' . $i;
$this->assertEquals(1,
db_insert(
'mailbox',
array(
'username' => $username,
'password' => 'blah',
'name' => 'blah',
'maildir' => 'blah',
'local_part' => 'blah',
'domain' => 'example.com',
)
)
);
}
// this breaks on sqlite atm.
$b = create_page_browser('mailbox.username FROM mailbox', 'WHERE 1 = 1' );
$this->assertNotEmpty($b);
}
}