Skip to content

Commit c15bd5e

Browse files
authored
Cleanup substring tests (function removed already b268b1) (beberlei#430)
1 parent ab8419f commit c15bd5e

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

tests/Query/Mysql/StringTest.php

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -73,42 +73,6 @@ public function testSoundex(): void
7373
);
7474
}
7575

76-
/**
77-
* Test cases for MYSQL SUBSTRING function.
78-
*/
79-
public function testSubstring(): void
80-
{
81-
$this->assertDqlProducesSql(
82-
"SELECT SUBSTRING('www.mysql.com', 1, 3) from DoctrineExtensions\Tests\Entities\Blank b",
83-
"SELECT SUBSTR('www.mysql.com', 1, 3) AS sclr_0 FROM Blank b0_"
84-
);
85-
86-
$this->assertDqlProducesSql(
87-
"SELECT SUBSTRING('www.mysql.com', 2) from DoctrineExtensions\Tests\Entities\Blank b",
88-
"SELECT SUBSTR('www.mysql.com', 2, LENGTH('www.mysql.com')) AS sclr_0 FROM Blank b0_"
89-
);
90-
91-
$this->assertDqlProducesSql(
92-
"SELECT SUBSTRING('www.mysql.com', -2, 2) from DoctrineExtensions\Tests\Entities\Blank b",
93-
"SELECT SUBSTR('www.mysql.com', -2, 2) AS sclr_0 FROM Blank b0_"
94-
);
95-
96-
$this->assertDqlProducesSql(
97-
'SELECT SUBSTRING(b.id, 5, 5) from DoctrineExtensions\Tests\Entities\Blank b',
98-
'SELECT SUBSTR(b0_.id, 5, 5) AS sclr_0 FROM Blank b0_'
99-
);
100-
101-
$this->assertDqlProducesSql(
102-
'SELECT SUBSTRING(b.id, 5) from DoctrineExtensions\Tests\Entities\Blank b',
103-
'SELECT SUBSTR(b0_.id, 5, LENGTH(b0_.id)) AS sclr_0 FROM Blank b0_'
104-
);
105-
106-
$this->assertDqlProducesSql(
107-
'SELECT SUBSTRING(b.id, -5, 2) from DoctrineExtensions\Tests\Entities\Blank b',
108-
'SELECT SUBSTR(b0_.id, -5, 2) AS sclr_0 FROM Blank b0_'
109-
);
110-
}
111-
11276
/**
11377
* Test cases for MYSQL SUBSTRING_INDEX function.
11478
*/

0 commit comments

Comments
 (0)