function testPreparedWithNegativeValue()
{
\Amp\reactor(\Amp\driver());
\Amp\run(function () {
$db = new Connection("host=" . DB_HOST . ";user=" . DB_USER . ";pass=" . DB_PASS . ";db=connectiontest");
$db->connect();
$db->query("DROP TABLE tmp");
// just in case it would exist...
(yield $db->prepare("CREATE TABLE tmp SELECT ? AS a", [-1]));
$result = (yield $db->prepare("SELECT a FROM tmp", []));
$this->assertEquals((yield $result->fetchRow()), [-1]);
});
}