Skip to content

Commit dd4efda

Browse files
authored
Merge pull request #20296 from briedis/master
Fix enum test. Value used in assertion did not match the actual enum name
2 parents 4ea0575 + b761bef commit dd4efda

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

framework/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Yii Framework 2 Change Log
2222
- Bug #20140: Fix compatibility with PHP 8.4: calling `session_set_save_handler()` (Izumi-kun)
2323
- New #20185: Add `BackedEnum` support to `AttributeTypecastBehavior` (briedis)
2424
- Bug #17365: Fix "Trying to access array offset on null" warning (xcopy)
25+
- Bug #20296: Fix broken enum test (briedis)
2526

2627
2.0.51 July 18, 2024
2728
--------------------

tests/framework/db/CommandTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1539,7 +1539,7 @@ public function testBindValuesSupportsEnums()
15391539
$command = $db->createCommand();
15401540

15411541
$command->setSql('SELECT :p1')->bindValues([':p1' => enums\Status::Active]);
1542-
$this->assertSame('ACTIVE', $command->params[':p1']);
1542+
$this->assertSame('Active', $command->params[':p1']);
15431543

15441544
$command->setSql('SELECT :p1')->bindValues([':p1' => enums\StatusTypeString::Active]);
15451545
$this->assertSame('active', $command->params[':p1']);

0 commit comments

Comments
 (0)