File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
src/Symfony/Cmf/Component/Testing/Unit/Constraint Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -47,18 +47,22 @@ public function toString() { }
47
47
protected function failureDescription ($ schemaFile )
48
48
{
49
49
return sprintf (
50
- '"%s" is accepted by the XML schema "%s" ' ,
51
- \PHPUnit_Util_Type::export ($ this ->xml [$ this ->failingElement ]),
50
+ "Xml is accepted by the XML schema \"%s \"" ,
52
51
$ schemaFile
53
52
);
54
53
}
55
54
56
55
protected function additionalFailureDescription ($ schema )
57
56
{
58
- $ str = '' ;
57
+ $ str = "\n" . $ this -> xml [ $ this -> failingElement ]-> saveXml (). "\n\n" ;
59
58
60
59
foreach ($ this ->errors as $ error ) {
61
- $ str .= $ error ->message .($ error ->file ? ' in ' .$ error ->file : '' ).' on line ' .$ error ->line ."\n" ;
60
+ $ error = trim ($ error ->message ).($ error ->file ? ' in ' .$ error ->file : '' ).' on line ' .$ error ->line ."\n" ;
61
+
62
+ // avoid repeating same error
63
+ if (false === strpos ($ str , $ error )) {
64
+ $ str .= $ error ;
65
+ }
62
66
}
63
67
64
68
return $ str ;
You can’t perform that action at this time.
0 commit comments