Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12610602
D3880.id10047.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D3880.id10047.diff
View Options
diff --git a/database/tests/Exceptions/SqlExceptionTest.php b/database/tests/Exceptions/SqlExceptionTest.php
--- a/database/tests/Exceptions/SqlExceptionTest.php
+++ b/database/tests/Exceptions/SqlExceptionTest.php
@@ -9,18 +9,20 @@
class SqlExceptionTest extends TestCase {
public function testGetQuery () {
- $sql = 'SELECT 1+';
- $ex = SqlException::fromQuery($sql, [
+ $state = [
"error" => 'Syntax error',
"errno" => 1064,
- ]);
+ ];
+
+ $sql = 'SELECT 1+';
+ $ex = SqlException::fromQuery($sql, $state);
$this->assertEquals(
$sql,
$ex->getQuery(),
""
);
- $ex = SqlException::fromQuery("", []);
+ $ex = SqlException::fromQuery("", $state);
$this->assertEquals(
"",
$ex->getQuery(),
diff --git a/database/tests/Query/PDOQueryTest.php b/database/tests/Query/PDOQueryTest.php
--- a/database/tests/Query/PDOQueryTest.php
+++ b/database/tests/Query/PDOQueryTest.php
@@ -24,8 +24,8 @@
}
protected function mockQuery () : PDOQuery {
- $engine = $this->createMock(PDOEngine::class);
- $statement = $this->createMock(PDOStatement::class);
+ $engine = $this->createStub(PDOEngine::class);
+ $statement = $this->createStub(PDOStatement::class);
return new PDOQuery($engine, $statement);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 13, 06:51 (18 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3162646
Default Alt Text
D3880.id10047.diff (1 KB)
Attached To
Mode
D3880: Avoid notices in database tests
Attached
Detach File
Event Timeline
Log In to Comment