5
5
namespace TarfinLabs \LaravelSpatial \Tests ;
6
6
7
7
use Illuminate \Support \Facades \Config ;
8
+ use PHPUnit \Framework \Attributes \Test ;
8
9
use TarfinLabs \LaravelSpatial \Types \Point ;
9
10
10
11
class PointTest extends TestCase
11
12
{
12
- /** @test */
13
+ #[Test]
13
14
public function it_sets_lat_lng_and_srid_in_constructor (): void
14
15
{
15
16
// 1. Arrange
@@ -26,7 +27,7 @@ public function it_sets_lat_lng_and_srid_in_constructor(): void
26
27
$ this ->assertSame (expected: $ srid , actual: $ point ->getSrid ());
27
28
}
28
29
29
- /** @test */
30
+ #[Test]
30
31
public function it_returns_default_lat_lng_and_srid_if_they_are_not_given_in_the_constructor (): void
31
32
{
32
33
// 1. Act
@@ -38,7 +39,7 @@ public function it_returns_default_lat_lng_and_srid_if_they_are_not_given_in_the
38
39
$ this ->assertSame (expected: 4326 , actual: $ point ->getSrid ());
39
40
}
40
41
41
- /** @test */
42
+ #[Test]
42
43
public function it_returns_default_srid_in_config_if_it_is_not_null (): void
43
44
{
44
45
// 1. Arrange
@@ -53,7 +54,7 @@ public function it_returns_default_srid_in_config_if_it_is_not_null(): void
53
54
$ this ->assertSame (expected: 4326 , actual: $ point ->getSrid ());
54
55
}
55
56
56
- /** @test */
57
+ #[Test]
57
58
public function it_returns_point_as_wkt (): void
58
59
{
59
60
// 1. Arrange
@@ -66,7 +67,7 @@ public function it_returns_point_as_wkt(): void
66
67
$ this ->assertSame ("POINT( {$ point ->getLng ()} {$ point ->getLat ()}) " , $ wkt );
67
68
}
68
69
69
- /** @test */
70
+ #[Test]
70
71
public function it_returns_point_as_pair (): void
71
72
{
72
73
// 1. Arrange
@@ -79,10 +80,7 @@ public function it_returns_point_as_pair(): void
79
80
$ this ->assertSame ("{$ point ->getLng ()} {$ point ->getLat ()}" , $ pair );
80
81
}
81
82
82
- /**
83
- * @test
84
- * @see
85
- */
83
+ #[Test]
86
84
public function it_returns_points_as_geometry (): void
87
85
{
88
86
// 1. Arrange
@@ -95,7 +93,7 @@ public function it_returns_points_as_geometry(): void
95
93
$ this ->assertSame ("ST_GeomFromText(' {$ point ->toWkt ()}', {$ point ->getSrid ()}, 'axis-order=long-lat') " , $ geometry );
96
94
}
97
95
98
- /** @test */
96
+ #[Test]
99
97
public function it_returns_points_as_array (): void
100
98
{
101
99
// 1. Arrange
0 commit comments