Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MatanYadaev committed Feb 19, 2024
1 parent d221dbb commit c8e1de4
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 27 deletions.
3 changes: 0 additions & 3 deletions tests/GeometryCastTest.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
<?php

use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Support\Facades\DB;
use MatanYadaev\EloquentSpatial\Enums\Srid;
use MatanYadaev\EloquentSpatial\Objects\LineString;
use MatanYadaev\EloquentSpatial\Objects\Point;
use MatanYadaev\EloquentSpatial\SpatialFunctionNormalizer;
use MatanYadaev\EloquentSpatial\Tests\TestModels\TestPlace;

uses(DatabaseMigrations::class);

it('creates a model record with null geometry', function (): void {
/** @var TestPlace $testPlace */
$testPlace = TestPlace::factory()->create(['point' => null]);
Expand Down
3 changes: 0 additions & 3 deletions tests/HasSpatialTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Support\Facades\DB;
use MatanYadaev\EloquentSpatial\AxisOrder;
use MatanYadaev\EloquentSpatial\Enums\Srid;
Expand All @@ -10,8 +9,6 @@
use MatanYadaev\EloquentSpatial\SpatialFunctionNormalizer;
use MatanYadaev\EloquentSpatial\Tests\TestModels\TestPlace;

uses(DatabaseMigrations::class);

it('calculates distance', function (): void {
TestPlace::factory()->create(['point' => new Point(0, 0, Srid::WGS84->value)]);

Expand Down
3 changes: 0 additions & 3 deletions tests/Objects/GeometryCollectionTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Support\Facades\DB;
use MatanYadaev\EloquentSpatial\Enums\Srid;
use MatanYadaev\EloquentSpatial\Objects\Geometry;
Expand All @@ -10,8 +9,6 @@
use MatanYadaev\EloquentSpatial\Objects\Polygon;
use MatanYadaev\EloquentSpatial\Tests\TestModels\TestPlace;

uses(DatabaseMigrations::class);

it('creates a model record with geometry collection', function (): void {
$geometryCollection = new GeometryCollection([
new Polygon([
Expand Down
3 changes: 0 additions & 3 deletions tests/Objects/LineStringTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Support\Facades\DB;
use MatanYadaev\EloquentSpatial\Enums\Srid;
use MatanYadaev\EloquentSpatial\Objects\Geometry;
Expand All @@ -9,8 +8,6 @@
use MatanYadaev\EloquentSpatial\Objects\Polygon;
use MatanYadaev\EloquentSpatial\Tests\TestModels\TestPlace;

uses(DatabaseMigrations::class);

it('creates a model record with line string', function (): void {
$lineString = new LineString([
new Point(0, 180),
Expand Down
3 changes: 0 additions & 3 deletions tests/Objects/MultiLineStringTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Support\Facades\DB;
use MatanYadaev\EloquentSpatial\Enums\Srid;
use MatanYadaev\EloquentSpatial\Objects\Geometry;
Expand All @@ -9,8 +8,6 @@
use MatanYadaev\EloquentSpatial\Objects\Point;
use MatanYadaev\EloquentSpatial\Tests\TestModels\TestPlace;

uses(DatabaseMigrations::class);

it('creates a model record with multi line string', function (): void {
$multiLineString = new MultiLineString([
new LineString([
Expand Down
3 changes: 0 additions & 3 deletions tests/Objects/MultiPointTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Support\Facades\DB;
use MatanYadaev\EloquentSpatial\Enums\Srid;
use MatanYadaev\EloquentSpatial\Objects\Geometry;
Expand All @@ -9,8 +8,6 @@
use MatanYadaev\EloquentSpatial\Objects\Polygon;
use MatanYadaev\EloquentSpatial\Tests\TestModels\TestPlace;

uses(DatabaseMigrations::class);

it('creates a model record with multi point', function (): void {
$multiPoint = new MultiPoint([
new Point(0, 180),
Expand Down
3 changes: 0 additions & 3 deletions tests/Objects/MultiPolygonTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Support\Facades\DB;
use MatanYadaev\EloquentSpatial\Enums\Srid;
use MatanYadaev\EloquentSpatial\Objects\Geometry;
Expand All @@ -10,8 +9,6 @@
use MatanYadaev\EloquentSpatial\Objects\Polygon;
use MatanYadaev\EloquentSpatial\Tests\TestModels\TestPlace;

uses(DatabaseMigrations::class);

it('creates a model record with multi polygon', function (): void {
$multiPolygon = new MultiPolygon([
new Polygon([
Expand Down
3 changes: 0 additions & 3 deletions tests/Objects/PointTest.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
<?php

use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Support\Facades\DB;
use MatanYadaev\EloquentSpatial\Enums\Srid;
use MatanYadaev\EloquentSpatial\Objects\Geometry;
use MatanYadaev\EloquentSpatial\Objects\Point;
use MatanYadaev\EloquentSpatial\Tests\TestModels\TestPlace;

uses(DatabaseMigrations::class);

it('creates a model record with point', function (): void {
$point = new Point(0, 180);

Expand Down
3 changes: 0 additions & 3 deletions tests/Objects/PolygonTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Support\Facades\DB;
use MatanYadaev\EloquentSpatial\Enums\Srid;
use MatanYadaev\EloquentSpatial\Objects\Geometry;
Expand All @@ -9,8 +8,6 @@
use MatanYadaev\EloquentSpatial\Objects\Polygon;
use MatanYadaev\EloquentSpatial\Tests\TestModels\TestPlace;

uses(DatabaseMigrations::class);

it('creates a model record with polygon', function (): void {
$polygon = new Polygon([
new LineString([
Expand Down
3 changes: 3 additions & 0 deletions tests/Pest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?php

use Illuminate\Foundation\Testing\RefreshDatabase;
use MatanYadaev\EloquentSpatial\Tests\TestCase;

uses(TestCase::class)->in(__DIR__);

uses(RefreshDatabase::class)->in(__DIR__);

0 comments on commit c8e1de4

Please sign in to comment.