Skip to content

Commit

Permalink
Add tests to test escaping array throwing exception
Browse files Browse the repository at this point in the history
  • Loading branch information
sidneyprins committed Oct 27, 2023
1 parent 8976223 commit 435a335
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/Integration/Database/MySql/EscapeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,11 @@ public function testEscapeStringNullByte()

$this->app['db']->escape("I am hiding a \00 byte");
}

public function testEscapeArray()
{
$this->expectException(RuntimeException::class);

$this->app['db']->escape(['a', 'b']);
}
}
7 changes: 7 additions & 0 deletions tests/Integration/Database/Postgres/EscapeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,11 @@ public function testEscapeStringNullByte()

$this->app['db']->escape("I am hiding a \00 byte");
}

public function testEscapeArray()
{
$this->expectException(RuntimeException::class);

$this->app['db']->escape(['a', 'b']);
}
}
7 changes: 7 additions & 0 deletions tests/Integration/Database/SqlServer/EscapeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,11 @@ public function testEscapeStringNullByte()

$this->app['db']->escape("I am hiding a \00 byte");
}

public function testEscapeArray()
{
$this->expectException(RuntimeException::class);

$this->app['db']->escape(['a', 'b']);
}
}
7 changes: 7 additions & 0 deletions tests/Integration/Database/Sqlite/EscapeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,11 @@ public function testEscapeStringNullByte()

$this->app['db']->escape("I am hiding a \00 byte");
}

public function testEscapeArray()
{
$this->expectException(RuntimeException::class);

$this->app['db']->escape(['a', 'b']);
}
}

0 comments on commit 435a335

Please sign in to comment.