What steps will reproduce the problem?
1. Run php docs unittest
2. All succeeds, including the testBigDoc test
What is the expected output? What do you see instead?
testBigDoc contains this line:
$this->assertTrue(count($summary) <= 500);
which will always return 1. Presumably, it should be doing this:
$this->assertTrue(strlen($summary) <= 500);
which is testing the length of the summary string. If that is the
intention, the test will fail as the summary length will be:
500 + (number_of_highlights * (strlen(highlight_bra) + strlen(highlight_ket)))
What should happen is that this is called first:
$this->assertTrue(strstr($summary, '<b>Derrida</b>'));
Then the highlight start and end strings are removed, then
$this->assertTrue(strlen($summary) <= 500);
is called.
What version of the product are you using? On what operating system?
flax-search-clients-0.1.0-alpha
Original issue reported on code.google.com by vittalai...@googlemail.com on 16 Jun 2009 at 11:03
Original issue reported on code.google.com by
vittalai...@googlemail.com
on 16 Jun 2009 at 11:03