i have a unit test that call this line:
phoenix/test/phpunit/unit/RbcTest.php:
[code=php]
$coverage->start('strtolowerTest.php');
[/code]
now in phoenix/test/phpunit/unit/strtolowerTest.ph
[code=php]
$t = new lime_test(2, new lime_output_color());
$t->is(myValidatorString::slugify('sensio labs'), 'sensio-labs');
$t->is(myValidatorString::slugify('paris,france'), 'paris-france');
$t->is(myValidatorString::slugify(' sensio'), 'sensio');
$t->is(myValidatorString::slugify('sensio '), 'sensio');
$t->is(myValidatorString::slugify(''), 'n-a', '::slugify() converts the empty string to n-a');
$t->is(myValidatorString::slugify(' - '), 'n-a', '::slugify() converts a string that only contains non-ASCII characters to n-a');
[/code]
then: phoenix/lib/validator/myValidatorString.class.ph
class myValidatorString extends sfValidatorString
{
static public function slugify($text)
{
echo "in myvalidatorstring for class sfValidatorString.class.php";
// replace all non letters or digits by -
$text = preg_replace('/\W+/', '-', $text);
// trim and lowercase
$text = strtolower(trim($text, '-'));
if (empty($text))
{
return 'n-a';
}
return $text;
}
when i run the RbcTest i get an error that it cannot find the class sfValidatorString which is in phoenix/lib/vendor/symfony/lib/validator/sfValidatorString.class.php
how can i fix this please?
thanks