Skip to content

Commit

Permalink
Move invalid update values data provider to operation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alcaeus committed Jun 27, 2023
1 parent 996a657 commit 72cbcc1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 10 additions & 0 deletions tests/Operation/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
}
10 changes: 0 additions & 10 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand Down Expand Up @@ -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.
*/
Expand Down

0 comments on commit 72cbcc1

Please sign in to comment.