- Apr 13, 2018
-
-
Andreas Gohr authored
While it's generally frowned upon testing privates, it can often be useful and the easier way to write tests. Eg you want to test something complicated method that is important, but you do not want to expose it directly to other classes... This new method uses reflection to make access to such methods possible from within tests without the need for intermediate classes.
-
- Mar 06, 2018
-
-
Phy authored
-
- Mar 12, 2017
-
-
Andreas Gohr authored
We still need 5 to test on old php versions, but travis uses 6 for newer PHP versions (and 5 may break on those). Luckily both versions aren't that far apart, yet. This adds a thin adapter class when running on 6.
-
Michael Grosse authored
However those classes are already supported in PHP 5.7 so we can switch to them without breaking backward-compatibility.
-
- Dec 01, 2016
-
-
Andreas Gohr authored
Some of our tests require that at least one second has passed before they can continue because our revisions depend on the Unix Timestamp. Currently we use a sleep(1) for this. However this always waits a whole second, even if the next second is already much closer or maybe already here - especially when some processing has been done since the last operation. This new method waits for the next second by checking the time every 10th of a second. This might speed up some of our tests a bit.
-
- Aug 09, 2016
-
-
Andreas Gohr authored
getMock is deprecated in new PHPUnit versions and createMock is the recommended replacement. However that one is not available in older PHPUnit releases. Since we still support older PHP releases we have to support older PHPUnit releases as well. This add some compatibility functions to our TestCase class and replaces all calls to getMock. Tested with PHPUnit 4.6.6 and 5.5.0.
-
- Mar 19, 2016
-
-
Gerrit Uitslag authored
-
- Jan 07, 2015
-
-
Andreas Gohr authored
In an older version of PHP a file_exists() call would issue a warning when the file did not exist. This was fixed in later PHP releases. Since we require PHP 5.3 now, there's no need to supress any error here anymore. This might even give a minor performance boost.
-
- Mar 06, 2014
-
-
Christopher Smith authored
Mostly this is for unit tests which use of \$_SERVER['REMOTE_USER'] It ensures the reference/alias connection between \$INPUT->server and \$_SERVER is renewed before each test. Tests using TestRequest class will replace this \$INPUT with their own.
-
- Dec 20, 2012
-
-
Michael Hamann authored
-
- Jul 28, 2012
-
-
Michael Hamann authored
-
- Jul 02, 2012
-
-
Andreas Gohr authored
-
- Apr 18, 2012
-
-
Tobias Sarnowski authored
-
Tobias Sarnowski authored
-
Tobias Sarnowski authored
-
- Apr 17, 2012
-
-
Tobias Sarnowski authored
-
Andreas Gohr authored
There's still more that I'd like to moved out. bootstrap should not contain any logic but only call the appropriate functions for setup the test environment.
-