Skip to content

Commit

Permalink
Try providing a valid resource
Browse files Browse the repository at this point in the history
Do not judge me I'm just trying things…
  • Loading branch information
greg0ire committed Oct 19, 2020
1 parent bac2bdc commit 86d3aa6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/Doctrine/Tests/DBAL/Driver/OCI8/OCI8StatementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
use Doctrine\Tests\DbalTestCase;
use ReflectionProperty;

use function fopen;

/**
* @requires extension oci8
*/
Expand Down Expand Up @@ -59,6 +61,10 @@ public function testExecute(array $params): void
$reflProperty->setAccessible(true);
$reflProperty->setValue($statement, $conn);

$reflProperty = new ReflectionProperty($statement, '_sth');
$reflProperty->setAccessible(true);
$reflProperty->setValue($statement, fopen('/dev/null', 'r'));

$this->expectException(OCI8Exception::class);
$statement->execute($params);
}
Expand Down

0 comments on commit 86d3aa6

Please sign in to comment.