diff --git a/phpunit.xml b/phpunit.xml index 1521390..c847bf6 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -4,7 +4,6 @@ backupGlobals="false" backupStaticAttributes="false" beStrictAboutTestsThatDoNotTestAnything="false" - bootstrap="../../../tests/bootstrap.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" diff --git a/tests/cases/classes/ModelObserverTest.php b/tests/cases/classes/ModelObserverTest.php index 995973d..eff9573 100644 --- a/tests/cases/classes/ModelObserverTest.php +++ b/tests/cases/classes/ModelObserverTest.php @@ -1,10 +1,10 @@ with('search.soft_delete', m::any())->andReturn($enabled); } + + /** + * Flush model event listeners. + * + * The models in Winter use a static property to store their events. These will need to be + * targeted and reset, ready for a new test cycle. + * + * Pivot models are an exception since they are internally managed. + */ + protected function flushModelEventListeners(): void + { + + } } diff --git a/tests/cases/traits/SearchableScopeTest.php b/tests/cases/traits/SearchableScopeTest.php index e71b3c4..dfd96c6 100644 --- a/tests/cases/traits/SearchableScopeTest.php +++ b/tests/cases/traits/SearchableScopeTest.php @@ -3,7 +3,7 @@ namespace Winter\Search\Tests\Cases\Traits; use Mockery as m; -use PluginTestCase; +use System\Tests\Bootstrap\PluginTestCase; use Winter\Storm\Database\Builder; use Winter\Search\Classes\SearchableScope; @@ -33,4 +33,17 @@ public function testChunksById() (new SearchableScope())->extend($builder); } + + /** + * Flush model event listeners. + * + * The models in Winter use a static property to store their events. These will need to be + * targeted and reset, ready for a new test cycle. + * + * Pivot models are an exception since they are internally managed. + */ + protected function flushModelEventListeners(): void + { + + } }