Skip to content
Snippets Groups Projects
  1. Apr 13, 2018
    • Andreas Gohr's avatar
      make testing of inaccessible methods easier · 210ff133
      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.
      210ff133
  2. Mar 06, 2018
  3. Mar 12, 2017
    • Andreas Gohr's avatar
      support phpunit 5 and 6 · 01ef6ea2
      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.
      01ef6ea2
    • Michael Grosse's avatar
      PHPUnit 6 now only supports namespaced classes · e3eb1d75
      Michael Grosse authored
      However those classes are already supported in PHP 5.7 so we can switch
      to them without breaking backward-compatibility.
      e3eb1d75
  4. Dec 01, 2016
    • Andreas Gohr's avatar
      new helper method waitForTick() in DokuWikiTest · d732617b
      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.
      d732617b
  5. Aug 09, 2016
    • Andreas Gohr's avatar
      fix tests for newer PHPUnit. fixes #1643 · db5867f1
      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.
      db5867f1
  6. Mar 19, 2016
  7. Jan 07, 2015
    • Andreas Gohr's avatar
      Remove error supression for file_exists() · 79e79377
      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.
      79e79377
  8. Mar 06, 2014
    • Christopher Smith's avatar
      Fix unittests broken by previous two commits · c01cdb70
      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.
      c01cdb70
  9. Dec 20, 2012
  10. Jul 28, 2012
  11. Jul 02, 2012
  12. Apr 18, 2012
  13. Apr 17, 2012
Loading