mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-30 19:00:10 +02:00
- Added Composite and Core strategies.
- Added generate_mock() function for testing - Factored out inputs/output tests to StrategyAbstractTest git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@124 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -24,14 +24,7 @@ class HTMLPurifier_Strategy_RemoveForeignElementsTest
|
||||
$inputs[2] = '<asdf>Bling</asdf><d href="bang">Bong</d><foobar />';
|
||||
$expect[2] = htmlspecialchars($inputs[2]);
|
||||
|
||||
foreach ($inputs as $i => $input) {
|
||||
$tokens = $this->lex->tokenizeHTML($input);
|
||||
$result_tokens = $strategy->execute($tokens);
|
||||
$result = $this->gen->generateFromTokens($result_tokens);
|
||||
$this->assertEqual($expect[$i], $result, "Test $i: %s");
|
||||
paintIf($result, $result != $expect[$i]);
|
||||
}
|
||||
|
||||
$this->assertStrategyWorks($strategy, $inputs, $expect);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user