Skip to content

Commit

Permalink
test: fix set_radio() tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed May 27, 2022
1 parent 7ee850b commit 8fa85dd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/system/Helpers/FormHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -843,12 +843,12 @@ public function testSetRadioFromSessionOldInput()
$_SESSION = [
'_ci_old_input' => [
'post' => [
'foo' => 'bar',
'foo' => '<bar>',
],
],
];

$this->assertSame(' checked="checked"', set_radio('foo', 'bar'));
$this->assertSame(' checked="checked"', set_radio('foo', '<bar>'));
$this->assertSame('', set_radio('foo', 'baz'));

unset($_SESSION['_ci_old_input']);
Expand All @@ -864,7 +864,7 @@ public function testSetRadioFromPost()

$this->assertSame(' checked="checked"', set_radio('bar', 'baz'));
$this->assertSame('', set_radio('bar', 'boop'));
$this->assertSame(' checked="checked"', set_radio('bar', 'boop', true));
$this->assertSame('', set_radio('bar', 'boop', true));
}

/**
Expand All @@ -873,7 +873,7 @@ public function testSetRadioFromPost()
*/
public function testSetRadioFromPostWithValueZero()
{
$_POST['bar'] = 0;
$_POST['bar'] = '0';

$this->assertSame(' checked="checked"', set_radio('bar', '0'));
$this->assertSame('', set_radio('bar', 'boop'));
Expand Down

0 comments on commit 8fa85dd

Please sign in to comment.