Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: When parser fails, don't show entire diff
Some of our fixtures are pretty big, and by using $this->assertSame() PHPUnit will show the entire diff, including all missing lines from $expectedCss and new lines which are the Parser exception. We have some tests where we store the parser error mesage as css file, and then we check if the Parser returns expected error messages, but all of those are below 1KB (to be exact, the biggest error css is 310 bytes). Therefore for small css files (less than 1KB) we will show the diff, presenting both the expected CSS and the parser error. For bigger files (like bootstrap) system should print only the parser exception, without printing thousands of expected css lines. Change-Id: I371d7b6b605b74ba3a44e83fb4c81c050649b735
- Loading branch information