Commit Graph

23 Commits

Author SHA1 Message Date
Sabina Talipova
8797f1f41e
ENH Restrict access to getJobStatus execution (#113) 2023-11-09 10:06:58 +13:00
Guy Sartorelli
e743b90607 Merge branch '2.2' into 2.3 2022-05-06 09:53:57 +12:00
Sabina Talipova
6d288c54f2 Add new permission group 2022-05-06 08:54:12 +12:00
Steve Boyd
1bfaf12909 ENH PHP 8.1 compatibility 2022-04-13 10:29:57 +12:00
Steve Boyd
c4e41d58ee Merge branch '2.1' into 2 2021-11-18 17:20:11 +13:00
Steve Boyd
fb9c340edb API phpunit 9 support 2021-10-27 18:06:53 +13:00
Steve Boyd
3da3567a7a MNT Add behat tests 2021-10-01 19:55:27 +13:00
Garion Herman
b4c210f211
FIX Exclude links attached to archived Pages from report (#72) 2021-02-04 09:45:39 +13:00
Robbie Averill
1ce8c3bbdf FIX Add missing namespace import - unknown HTTP status codes are now handled 2019-07-26 11:16:31 +02:00
Robbie Averill
78fbc68797 FIX Implement TestOnly in PretendLinkChecker, move Page stub and sort class imports 2017-11-28 09:35:31 +13:00
Dylan Wagstaff
98dac9b314 Update unit tests to be rid of Phockito
This odd dependency is causing inclusion issues to do with namespacing and
the ability to work well with the framework (according to the dependency's
readme). The usage of the tool in this case adds no value, as it's
performing purely stub type work, rather than mock work. So instead we can
use an actual stub (simply return test values depending on input) and have
everything work well.

After removing the Phockito dependency it was found that the tests that
would skip when it isn't present were actually in a failing state. So they
had to be repaired too, mostly through the use of fixing the poor code
that was causing them to fail (as opposed to being bad tests). This is
both configuration and proceedural work.
2017-11-27 15:14:16 +13:00
Dylan Wagstaff
0374d66b32 Convert to new cache layer, clean up other overlooked points in the ss4 upgrade 2017-11-27 11:19:58 +13:00
Dylan Wagstaff
7bce7dcb2f Update tests & left over fixes from upgrader tool 2017-11-23 14:54:27 +13:00
Dylan Wagstaff
a88e8be403 FIX Linting errors for code cleanliness 2017-11-23 13:19:00 +13:00
Dylan Wagstaff
1ed9a23a71 Run the upgrader & linting tools
An initial (untested) run at a proper upgrade. Progress commit.
2017-11-23 12:56:44 +13:00
Robbie Averill
99d4a6ee1a FIX Ensure that translatable cannot break tests. Separate page stub class. Remove injector nesting. 2017-05-12 11:38:49 +12:00
Ingo Schommer
38659bac98 Include Hamcrest without clashing with PHPUnit globals
PHPUnit had a Functions.php with global methods like any() for a while (3.7 at least),
which clashes with similar globals from Hamcrest (used in Phockito).

Both PHPUnit and Phockito use 'classmap' composer autoloading,
but that's not directly requiring/evaluating the files.
The problem is caused by SilverStripe's ClassLoader
which does require ALL subclasses of SapphireTest.
This in turn causes PHP outside of the class context to execute,
which includes Hamcrest.

Changing the include_hamcrest() is not strictly necessary here,
but makes the code a bit more resilient against any preceding
test including Functions.php from PHPUnit.

See https://github.com/hafriedlander/phockito/issues/32 for context.
2015-04-29 14:28:08 +12:00
Damian Mooyman
7328344408 API Add description for response code to report 2014-08-13 10:20:39 +12:00
Damian Mooyman
a4ede246ab Tests, refactor, cleanup, fix issues 2014-08-07 15:24:20 +12:00
Kirk Mayo
6bda4dcc82 BUG: Correcting test code and fixing bug with create report button 2014-08-04 17:38:28 +12:00
Kirk Mayo
da7e45ddd4 BUG: Fixing report page link and set to check stage not live 2014-08-04 15:26:22 +12:00
Kirk Mayo
e9fe1a4707 NEW: Use DB row for job status and refactor the sql statements 2014-08-01 12:48:30 +12:00
Kirk Mayo
d25adca175 NEW: Adding tests and code tidyup 2014-07-29 09:31:22 +12:00