Skip to content

Commit

Permalink
Set correct expected exception in AbstractTestCase
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Apr 30, 2015
1 parent eb42adf commit 7717d70
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions phpunit-bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function bootstrap()
} else {
switch ($engine) {
case 'PDO_MYSQL':
echo 'Using PDOEngine with MySQL' . PHP_EOL;
echo 'Using PDOEngine for MySQL' . PHP_EOL;

$pdo = new PDO('mysql:host=localhost', 'root', '');

Expand Down Expand Up @@ -72,7 +72,7 @@ function bootstrap()
break;

case 'PDO_PGSQL':
echo 'Using PDOEngine with PostgreSQL' . PHP_EOL;
echo 'Using PDOEngine for PostgreSQL' . PHP_EOL;

$pdo = new PDO('pgsql:host=localhost', 'postgres', '');

Expand Down
10 changes: 5 additions & 5 deletions tests/AbstractTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

namespace Brick\Geo\Tests;

use Brick\Geo\CoordinateSystem;
use Brick\Geo\Exception\GeometryEngineException;
use Brick\Geo\Engine\GeometryEngineRegistry;
use Brick\Geo\Engine\GEOSEngine;
use Brick\Geo\Engine\PDOEngine;
use Brick\Geo\Engine\SQLite3Engine;
use Brick\Geo\Exception\GeometryException;
use Brick\Geo\CoordinateSystem;
use Brick\Geo\Geometry;
use Brick\Geo\GeometryCollection;
use Brick\Geo\MultiLineString;
Expand Down Expand Up @@ -141,7 +141,7 @@ final protected function skipIfUnsupportedGeometry(Geometry $geometry)
if ($geometry->is3D() || $geometry->isMeasured()) {
if ($this->isMySQL() || $this->isMariaDB()) {
// MySQL and MariaDB do not support Z and M coordinates.
$this->setExpectedException(GeometryException::class);
$this->setExpectedException(GeometryEngineException::class);
}
}

Expand All @@ -154,7 +154,7 @@ final protected function skipIfUnsupportedGeometry(Geometry $geometry)
if ($geometry->isEmpty() && ! $geometry instanceof GeometryCollection) {
if ($this->isMySQL() || $this->isMariaDB()) {
// MySQL and MariaDB do not correctly handle empty geometries, apart from collections.
$this->setExpectedException(GeometryException::class);
$this->setExpectedException(GeometryEngineException::class);
}

if ($this->isSpatiaLite()) {
Expand All @@ -166,7 +166,7 @@ final protected function skipIfUnsupportedGeometry(Geometry $geometry)
if ($this->isGEOS() || $this->isSpatiaLite() || $this->isMySQL() || $this->isMariaDB()) {
// GEOS, SpatiaLite, MySQL and MariaDB do not support these geometries.
// Only PostGIS currently supports these.
$this->setExpectedException(GeometryException::class);
$this->setExpectedException(GeometryEngineException::class);
}
}
}
Expand Down

0 comments on commit 7717d70

Please sign in to comment.