Commit Graph

21 Commits

Author SHA1 Message Date
Steve Boyd 302af21cad ENH PHP 8.1 compatibility 2022-04-13 11:24:03 +12:00
Steve Boyd 752803148d API phpunit 9 support 2021-11-02 14:48:12 +13:00
Steve Boyd cfe937fbd1 NEW canView() check on record before indexing and before showing in search results 2020-06-10 17:22:20 +12:00
Steve Boyd bfa2edee6a Improved search filtering based on visibility 2020-04-09 09:04:01 +12:00
Robbie Averill 2fdf87bbf1 FIX Remove resetDBSchema use, not required and breaking 4.2 tests
Also reduces tearDown to protected visiblity as it is in SapphireTest and optimises class imports
2018-06-15 14:07:30 +12:00
Robbie Averill 4d57f09230 NEW Replace backslashes in Solr index names with dashes 2017-12-06 10:17:24 +13:00
Robbie Averill 861f87514d API Update Subsite integration, remove Polyhome variant
Add a method to clear cached variants from SearchVariant, and a configuration flag for whether
a variant should be enabled or not. Add a FullTextSearch TestState class which will globally
disable the queuedjobs and fulltextsearch shutdown handlers during tests, and is not used to
clear cached variants on each test to prevent global state leakage.

Also removes Phockito as a test dependency.
2017-12-05 14:29:53 +13:00
Robbie Averill e590132967 FIX Run phpcbf automated linting to fix PSR-2 code styles, add PSR-4 autoloader 2017-11-15 09:53:33 +13:00
Robbie Averill b448bfcd20 NEW Add config for shutdown flush, remove references to Object and update tests 2017-11-14 17:05:30 +13:00
Brett Tasker a8588b2fd8 Merge branch 'compat/4' into compat4/btasker 2017-04-27 00:24:46 +12:00
Brett Tasker 73e4888715 SS 4.0 - Upgrade tests to SilverStripe 4.0 & Replace Phockito 2017-04-26 22:53:00 +12:00
Marco Hermo e422ad48c9 Use PHP5.5 class name resolution operator 2017-04-25 21:11:29 +12:00
Marco Hermo 8228c762c9 Explicit namespace definition on YAML files 2017-04-24 09:05:47 +12:00
Brett Tasker 43dd2ba398 SS 4.0 - Replace inst()->update with modify()->set and hasOne with hasOneComponent 2017-04-22 21:31:34 +12:00
Brett Tasker 0ee34e49e2 Fix PHP errors in test 2017-04-21 13:26:07 +12:00
Brett Tasker 0ebf6e6220 Second push of Test changes + namespacing 2017-04-21 13:18:37 +12:00
Brett Tasker ddbab95e3f Namespacing for tests 2017-04-21 12:23:27 +12:00
Damian Mooyman e5fbdf9d42 BUG fix issues with search variants applying to more than one class 2016-04-26 12:43:31 +12:00
madmatt 665490dfde MINOR: Don't include Hamcrest globally so it doesn't conflict with PHPUnit
PHPUnit now includes matching functions like `any()` and `anything()` outside of a namespace, which conflicts with `Phockito` that does the same thing when calling `Phockito::include_hamcrest(true)`.

This test in particular breaks Behat, because the file includes a class (`SolrReindexTest_Item`) that extends `DataObject`, meaning that this file gets included very early in the initialisation process.

Instead, we can just set `Phockito::include_hamcrest(false)` and use the full path to the Hamcrest matching functions instead (e.g. `\Hamcrest_Matchers::anything()`).
2015-11-27 12:43:33 +13:00
helpfulrobot 314feddd48 Converted to PSR-2 2015-11-21 19:19:20 +13:00
Damian Mooyman 1683f776bd API QueuedJob support for Solr_Reindex
API Incremental clear and re-index of records rather than clearing all records from SolrIndex up front
2015-07-28 12:46:23 +12:00