From 72cbcc1f0740220655ebd9154f3d75e6c3c73bef Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Mon, 26 Jun 2023 08:45:01 +0200 Subject: [PATCH] Move invalid update values data provider to operation tests --- tests/Operation/TestCase.php | 10 ++++++++++ tests/TestCase.php | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/Operation/TestCase.php b/tests/Operation/TestCase.php index 684899ec5..386468ce2 100644 --- a/tests/Operation/TestCase.php +++ b/tests/Operation/TestCase.php @@ -74,4 +74,14 @@ public function provideEmptyUpdatePipelinesExcludingArray(): array 'empty_pipeline:PackedArray' => [PackedArray::fromPHP([])], ]; } + + public function provideInvalidUpdateValues(): array + { + return $this->wrapValuesForDataProvider($this->getInvalidUpdateValues()); + } + + protected function getInvalidUpdateValues(): array + { + return [123, 3.14, 'foo', true]; + } } diff --git a/tests/TestCase.php b/tests/TestCase.php index 0de87b0a1..dd8d94094 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -140,11 +140,6 @@ public function provideInvalidIntegerValues() return $this->wrapValuesForDataProvider($this->getInvalidIntegerValues()); } - public function provideInvalidUpdateValues() - { - return $this->wrapValuesForDataProvider($this->getInvalidUpdateValues()); - } - protected function assertDeprecated(callable $execution): void { $errors = []; @@ -307,11 +302,6 @@ protected function getInvalidStringValues(bool $includeNull = false): array return array_merge([123, 3.14, true, [], new stdClass()], $includeNull ? [null] : []); } - protected function getInvalidUpdateValues(): array - { - return [123, 3.14, 'foo', true]; - } - /** * Return a list of invalid WriteConcern values. */