Skip to content

Commit e53b236

Browse files
committed
Try another syntax
1 parent de330b5 commit e53b236

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

Diff for: tests/Integration/MariaDB/PDOTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function testComplexActions(): void
4444
$points = [
4545
Sfc::point(0, 0),
4646
new Point('POINT(?, ?)', [0, 10]),
47-
new Geometry("'POINT(5 5)'::geometry"),
47+
new Geometry("ST_GeomFromText('POINT(5 5)')"),
4848
];
4949

5050
$hull = $points[0]->union($points[1])->union($points[2])->convexHull();

Diff for: tests/Integration/MySQL/PDOTest.php

+8-4
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,22 @@ protected function setUp(): void
1717
{
1818
parent::setUp();
1919

20-
$dsn = "mysql:host=127.0.0.1;port=3306;dbname=sfa;";
20+
/* $dsn = "mysql:host=127.0.0.1;port=3306;dbname=sfa;";
2121
2222
$this->pdo = new PDO($dsn, 'sfa', 'sfa', [
2323
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
2424
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
25-
]);
25+
]);*/
2626
}
2727

28-
public function testConstructors(): void
28+
public function testConstructorsXXXX(): void
2929
{
3030
$point = Sfc::point(23, 56, 4326);
3131

32+
33+
$this->assertEquals(123, (string) $point->x());
34+
35+
3236
$this->assertEquals(23, $this->selectVal($point->x()));
3337
$this->assertEquals(56, $this->selectVal($point->y()));
3438
$this->assertEquals(4326, $this->selectVal($point->srid()));
@@ -44,7 +48,7 @@ public function testComplexActions(): void
4448
$points = [
4549
Sfc::point(0, 0),
4650
new Point('POINT(?, ?)', [0, 10]),
47-
new Geometry("'POINT(5 5)'::geometry"),
51+
new Geometry("ST_GeomFromText('POINT(5 5)')"),
4852
];
4953

5054
$hull = $points[0]->union($points[1])->union($points[2])->convexHull();

0 commit comments

Comments
 (0)