Skip to content

Instantly share code, notes, and snippets.

@yuya-matsushima
Created July 16, 2011 13:49
Show Gist options
  • Save yuya-matsushima/1086370 to your computer and use it in GitHub Desktop.
Save yuya-matsushima/1086370 to your computer and use it in GitHub Desktop.
sample test
<?php
class Utility_helper_tests extends TEST_Controller
{
function __construct()
{
parent::__construct();
}
// h() test
function h_str()
{
$str = "<>&'";
$test = h($str);
$expected = htmlspecialchars($str, ENT_QUOTES, "UTF-8");
$this->unit->run($test, $expected);
$this->unit->run($test, 'is_string');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment