Created
August 21, 2009 16:29
-
-
Save anonymous/172164 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#---------------------------------------------------------------------------- | |
# Test that HTML entities are decoded. | |
$article->update({ | |
description => "schön & cañón", | |
}); | |
$indexer = WebGUI::Search::Index->create( $article ); | |
my $pretty = "schön"; | |
my $canyon = "cañón"; | |
utf8::upgrade($pretty); | |
utf8::upgrade($canyon); | |
$row = $db->quickHashRef( "SELECT * FROM assetIndex WHERE assetId=?", [ $article->getId ] ); | |
my $keywords = $row->{keywords}; | |
utf8::upgrade($keywords); | |
cmp_deeply ( | |
$row, | |
superhashof({ | |
keywords => all( # keywords contains title, menuTitle, every part of the URL and every keyword | |
re($pretty), | |
re("&"), | |
re($canyon), | |
), | |
}), | |
"Index has decoded entities" | |
); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment