mirror of
https://github.com/danog/sql.git
synced 2024-11-26 20:15:08 +01:00
21 lines
475 B
PHP
21 lines
475 B
PHP
<?php
|
|
|
|
namespace Amp\Sql\Test;
|
|
|
|
use Amp\PHPUnit\AsyncTestCase;
|
|
use Amp\Sql\QueryError;
|
|
|
|
class QueryErrorTest extends AsyncTestCase
|
|
{
|
|
/**
|
|
* @test
|
|
*/
|
|
public function testItPassesQueryAlong()
|
|
{
|
|
$error = new QueryError('error', 'SELECT * FROM foo');
|
|
|
|
$this->assertSame('SELECT * FROM foo', $error->getQuery());
|
|
$this->assertStringStartsWith("Amp\Sql\QueryError: error\nCurrent query was SELECT * FROM foo", (string) $error);
|
|
}
|
|
}
|