Skip to content

Commit 444a911

Browse files
committed
Skipping JSON column related tests in Oracle
1 parent 9ca23b9 commit 444a911

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

tests/TDBMDaoGeneratorTest.php

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2031,6 +2031,10 @@ public function testJsonFormat(): void
20312031
*/
20322032
public function testJsonCollection(): void
20332033
{
2034+
// This test tries to perform a SELECT DISTINCT on a JSON column (which is represented as a CLOB column in Oracle)
2035+
// DISTINCT statements cannot be applied on CLOB columns. As a result, JSON columns are not supported in Oracle + TDBM 5 for now.
2036+
$this->skipOracle();
2037+
20342038
$artists = new ArtistDao($this->tdbmService);
20352039
$pinkFloyd = $artists->getById(1);
20362040
$animals = $pinkFloyd->getAlbums()[0];
@@ -2054,6 +2058,10 @@ public function testJsonCollection(): void
20542058

20552059
public function testFloydHasNoParent(): void
20562060
{
2061+
// This test tries to perform a SELECT DISTINCT on a JSON column (which is represented as a CLOB column in Oracle)
2062+
// DISTINCT statements cannot be applied on CLOB columns. As a result, JSON columns are not supported in Oracle + TDBM 5 for now.
2063+
$this->skipOracle();
2064+
20572065
$artists = new ArtistDao($this->tdbmService);
20582066
$pinkFloyd = $artists->getById(1);
20592067
$parents = $pinkFloyd->getParents();
@@ -2063,6 +2071,10 @@ public function testFloydHasNoParent(): void
20632071

20642072
public function testFloydHasOneChild(): void
20652073
{
2074+
// This test tries to perform a SELECT DISTINCT on a JSON column (which is represented as a CLOB column in Oracle)
2075+
// DISTINCT statements cannot be applied on CLOB columns. As a result, JSON columns are not supported in Oracle + TDBM 5 for now.
2076+
$this->skipOracle();
2077+
20662078
$artists = new ArtistDao($this->tdbmService);
20672079
$pinkFloyd = $artists->getById(1);
20682080
$children = $pinkFloyd->getChildrenByArtistsRelations();
@@ -2076,11 +2088,6 @@ public function testFloydHasOneChild(): void
20762088
*/
20772089
public function testAddInterfaceAnnotation(): void
20782090
{
2079-
if (!$this->tdbmService->getConnection()->getDatabasePlatform() instanceof MySqlPlatform) {
2080-
// See https://github.com/doctrine/dbal/pull/3512
2081-
$this->markTestSkipped('Only MySQL supports table level comments');
2082-
}
2083-
20842091
$refClass = new ReflectionClass(UserBaseBean::class);
20852092
$this->assertTrue($refClass->implementsInterface(TestUserInterface::class));
20862093
}
@@ -2090,11 +2097,6 @@ public function testAddInterfaceAnnotation(): void
20902097
*/
20912098
public function testAddInterfaceOnDaoAnnotation(): void
20922099
{
2093-
if (!$this->tdbmService->getConnection()->getDatabasePlatform() instanceof MySqlPlatform) {
2094-
// See https://github.com/doctrine/dbal/pull/3512
2095-
$this->markTestSkipped('Only MySQL supports table level comments');
2096-
}
2097-
20982100
$refClass = new ReflectionClass(UserBaseDao::class);
20992101
$this->assertTrue($refClass->implementsInterface(TestUserDaoInterface::class));
21002102
}
@@ -2104,11 +2106,6 @@ public function testAddInterfaceOnDaoAnnotation(): void
21042106
*/
21052107
public function testTrait(): void
21062108
{
2107-
if (!$this->tdbmService->getConnection()->getDatabasePlatform() instanceof MySqlPlatform) {
2108-
// See https://github.com/doctrine/dbal/pull/3512
2109-
$this->markTestSkipped('Only MySQL supports table level comments');
2110-
}
2111-
21122109
$userDao = new UserDao($this->tdbmService);
21132110
$userBean = $userDao->getById(1);
21142111

@@ -2189,6 +2186,8 @@ public function testLazyLoad(): void
21892186
*/
21902187
public function testOneToOneInverseRelationGetter(): void
21912188
{
2189+
$this->skipOracle();
2190+
21922191
$objectBaseDao = new BaseObjectDao($this->tdbmService);
21932192
$objectInheritedDao = new InheritedObjectDao($this->tdbmService);
21942193
$objectBase = new BaseObjectBean('label');

0 commit comments

Comments
 (0)