Skip to content

Commit e1afb7c

Browse files
committed
Keep debugging the workflow
1 parent f63d190 commit e1afb7c

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

tests/Integration/MariaDB/PDOTest.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -53,30 +53,30 @@ public function testComplexActions(): void
5353

5454
$pointInside = Sfc::point(3, 5);
5555
$pointOutside = Sfc::point(10, 10);
56-
$this->assertTrue($this->selectVal(
56+
$this->assertEquals(1, $this->selectVal(
5757
$hull->contains($pointInside)
5858
));
59-
$this->assertTrue($this->selectVal(
59+
$this->assertEquals(1, $this->selectVal(
6060
$pointInside->within($hull)
6161
));
62-
$this->assertFalse($this->selectVal(
62+
$this->assertEquals(0, $this->selectVal(
6363
$hull->contains($pointOutside)
6464
));
65-
$this->assertFalse($this->selectVal(
65+
$this->assertEquals(0, $this->selectVal(
6666
$pointOutside->within($hull)
6767
));
6868

6969
$line = Sfc::lineFromText('LINESTRING(3 3,10 10)');
70-
$this->assertFalse($this->selectVal(
70+
$this->assertEquals(0, this->selectVal(
7171
$hull->contains($line)
7272
));
73-
$this->assertFalse($this->selectVal(
73+
$this->assertEquals(0, $this->selectVal(
7474
$line->within($hull)
7575
));
76-
$this->assertTrue($this->selectVal(
76+
$this->assertEquals(1, $this->selectVal(
7777
$hull->intersects($line)
7878
));
79-
$this->assertTrue($this->selectVal(
79+
$this->assertEquals(1, $this->selectVal(
8080
$line->intersects($hull)
8181
));
8282
}

tests/Integration/MySQL/PDOTest.php

+12-11
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@ protected function setUp(): void
2727

2828
public function testConstructors(): void
2929
{
30-
$point = Sfc::point(23, 56, 4326);
30+
// Using 3059 because in MySQL
31+
// ST_X(ST_SRID(POINT(23, 56), 4326)) is 56, but that doesn't happen with the other SRIDs...
32+
$point = Sfc::point(23, 56, 3059);
3133

32-
$this->assertEquals(23, (string) $point->x());
3334
$this->assertEquals(23, $this->selectVal($point->x()));
3435
$this->assertEquals(56, $this->selectVal($point->y()));
35-
$this->assertEquals(4326, $this->selectVal($point->srid()));
36+
$this->assertEquals(3059, $this->selectVal($point->srid()));
3637
}
3738

3839
/**
@@ -55,30 +56,30 @@ public function testComplexActions(): void
5556

5657
$pointInside = Sfc::point(3, 5);
5758
$pointOutside = Sfc::point(10, 10);
58-
$this->assertTrue($this->selectVal(
59+
$this->assertEquals(1, $this->selectVal(
5960
$hull->contains($pointInside)
6061
));
61-
$this->assertTrue($this->selectVal(
62+
$this->assertEquals(1, $this->selectVal(
6263
$pointInside->within($hull)
6364
));
64-
$this->assertFalse($this->selectVal(
65+
$this->assertEquals(0, $this->selectVal(
6566
$hull->contains($pointOutside)
6667
));
67-
$this->assertFalse($this->selectVal(
68+
$this->assertEquals(0, $this->selectVal(
6869
$pointOutside->within($hull)
6970
));
7071

7172
$line = Sfc::lineFromText('LINESTRING(3 3,10 10)');
72-
$this->assertFalse($this->selectVal(
73+
$this->assertEquals(0, this->selectVal(
7374
$hull->contains($line)
7475
));
75-
$this->assertFalse($this->selectVal(
76+
$this->assertEquals(0, $this->selectVal(
7677
$line->within($hull)
7778
));
78-
$this->assertTrue($this->selectVal(
79+
$this->assertEquals(1, $this->selectVal(
7980
$hull->intersects($line)
8081
));
81-
$this->assertTrue($this->selectVal(
82+
$this->assertEquals(1, $this->selectVal(
8283
$line->intersects($hull)
8384
));
8485
}

0 commit comments

Comments
 (0)