Skip to content

Commit

Permalink
Adding a test case for nested array data and clean().
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jul 22, 2010
1 parent f6c7be9 commit fbb54e6
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions cake/tests/cases/libs/sanitize.test.php
Expand Up @@ -193,6 +193,29 @@ function testClean() {
$expected = '';
$result = Sanitize::clean($string);
$this->assertEqual($string, $expected);

$data = array(
'Grant' => array(
'title' => '2 o clock grant',
'grant_peer_review_id' => 3,
'institution_id' => 5,
'created_by' => 1,
'modified_by' => 1,
'created' => '2010-07-15 14:11:00',
'modified' => '2010-07-19 10:45:41'
),
'GrantsMember' => array(
0 => array(
'id' => 68,
'grant_id' => 120,
'member_id' => 16,
'program_id' => 29,
'pi_percent_commitment' => 1
)
)
);
$result = Sanitize::clean($data);
$this->assertEqual($result, $data);
}

/**
Expand Down

0 comments on commit fbb54e6

Please sign in to comment.