Skip to content

Commit 2c33eff

Browse files
committed
Oracle order seems case sensitive. Fixing test.
1 parent 5dd998b commit 2c33eff

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

tests/TDBMAbstractServiceTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ private static function initSchema(Connection $connection): void
438438
'label' => 'France',
439439
]);
440440
self::insert($connection, 'country', [
441-
'label' => 'UK',
441+
'label' => 'uk',
442442
]);
443443
self::insert($connection, 'country', [
444444
'label' => 'Jamaica',
@@ -661,6 +661,7 @@ private static function initSchema(Connection $connection): void
661661
'entry' => '</h1>'
662662
]);
663663

664+
664665
self::insert($connection, 'artists', [
665666
'id' => 1,
666667
'name' => 'Pink Floyd'

tests/TDBMDaoGeneratorTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ public function testForeignKeyInBean(): void
270270
$userBean = $userDao->getById(1);
271271
$country = $userBean->getCountry();
272272

273-
$this->assertEquals('UK', $country->getLabel());
273+
$this->assertEquals('uk', $country->getLabel());
274274

275275
$userBean2 = $userDao->getById(1);
276276
$this->assertTrue($userBean === $userBean2);
@@ -891,7 +891,7 @@ public function testJsonEncodeBean(): void
891891
$this->assertNull($userDecoded['modifiedAt']);
892892

893893
// testing many to 1 relationships
894-
$this->assertEquals('UK', $userDecoded['country']['label']);
894+
$this->assertEquals('uk', $userDecoded['country']['label']);
895895

896896
// testing many to many relationships
897897
$this->assertCount(1, $userDecoded['roles']);
@@ -1059,7 +1059,7 @@ public function testCloneBeanAttachedBean(): void
10591059
$this->assertNull($user2->getId());
10601060
$this->assertEquals('bill.shakespeare', $user2->getLogin());
10611061
$this->assertEquals('Bill Shakespeare', $user2->getName());
1062-
$this->assertEquals('UK', $user2->getCountry()->getLabel());
1062+
$this->assertEquals('uk', $user2->getCountry()->getLabel());
10631063

10641064
// MANY 2 MANY must be duplicated
10651065
$this->assertEquals('Writers', $user2->getRoles()[0]->getName());
@@ -1094,7 +1094,7 @@ public function testCloneNewBean(): void
10941094
$this->assertNull($user2->getId());
10951095
$this->assertEquals('john.doe', $user2->getLogin());
10961096
$this->assertEquals('John Doe', $user2->getName());
1097-
$this->assertEquals('UK', $user2->getCountry()->getLabel());
1097+
$this->assertEquals('uk', $user2->getCountry()->getLabel());
10981098

10991099
// MANY 2 MANY must be duplicated
11001100
$this->assertEquals($role->getName(), $user2->getRoles()[0]->getName());
@@ -1379,7 +1379,7 @@ public function testOrderByExternalCol(): void
13791379
$userDao = new TestUserDao($this->tdbmService);
13801380
$users = $userDao->getUsersByCountryName();
13811381

1382-
$this->assertEquals('UK', $users[0]->getCountry()->getLabel());
1382+
$this->assertEquals('uk', $users[0]->getCountry()->getLabel());
13831383
}
13841384

13851385
/**
@@ -1390,7 +1390,7 @@ public function testResultIteratorSort(): void
13901390
$userDao = new UserDao($this->tdbmService);
13911391
$users = $userDao->findAll()->withOrder('country.label DESC');
13921392

1393-
$this->assertEquals('UK', $users[0]->getCountry()->getLabel());
1393+
$this->assertEquals('uk', $users[0]->getCountry()->getLabel());
13941394

13951395
$users = $users->withOrder('country.label ASC');
13961396
$this->assertEquals('France', $users[0]->getCountry()->getLabel());

0 commit comments

Comments
 (0)