mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
parent
33b14e7ec2
commit
adb64c074a
@ -70,9 +70,11 @@ class DiffTest extends SapphireTest
|
|||||||
$from = "$sentenceOne $sentenceTwo";
|
$from = "$sentenceOne $sentenceTwo";
|
||||||
$to = "$sentenceTwo $sentenceOne";
|
$to = "$sentenceTwo $sentenceOne";
|
||||||
|
|
||||||
$expected = "<del>$sentenceOne</del> $sentenceTwo <ins>$sentenceOne</ins>";
|
// We're cheating our test a little bit here, because depending on what HTML cleaner you have, you'll get
|
||||||
|
// spaces added or not added around the tags.
|
||||||
|
$expected = "/^ *<del>$sentenceOne<\/del> *$sentenceTwo *<ins>$sentenceOne<\/ins> *$/";
|
||||||
$actual = Diff::compareHTML($from, $to);
|
$actual = Diff::compareHTML($from, $to);
|
||||||
|
|
||||||
$this->assertEquals($expected, $actual);
|
$this->assertRegExp($expected, $actual);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user