Skip to content

Commit 08e1870

Browse files
committed
Fixes
1 parent 03b1abb commit 08e1870

File tree

2 files changed

+3
-22
lines changed

2 files changed

+3
-22
lines changed

tests/Operation/FindTest.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -56,25 +56,6 @@ public static function provideInvalidConstructorOptions()
5656
]);
5757
}
5858

59-
#[DataProvider('provideInvalidConstructorCursorTypeOptions')]
60-
public function testSnapshotOptionIsDeprecated(): void
61-
{
62-
$this->assertDeprecated(function (): void {
63-
new Find($this->getDatabaseName(), $this->getCollectionName(), [], ['snapshot' => true]);
64-
});
65-
66-
$this->assertDeprecated(function (): void {
67-
new Find($this->getDatabaseName(), $this->getCollectionName(), [], ['snapshot' => false]);
68-
});
69-
}
70-
71-
public function testMaxScanOptionIsDeprecated(): void
72-
{
73-
$this->assertDeprecated(function (): void {
74-
new Find($this->getDatabaseName(), $this->getCollectionName(), [], ['maxScan' => 1]);
75-
});
76-
}
77-
7859
#[DataProvider('provideInvalidConstructorCursorTypeOptions')]
7960
public function testConstructorCursorTypeOption($cursorType): void
8061
{

tests/TestCase.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,12 @@ final public static function provideInvalidStringValues(): array
159159
return self::wrapValuesForDataProvider(self::getInvalidStringValues());
160160
}
161161

162-
protected function assertDeprecated(callable $execution)
162+
protected function assertDeprecated(callable $execution): mixed
163163
{
164-
$this->assertError(E_USER_DEPRECATED | E_DEPRECATED, $execution);
164+
return $this->assertError(E_USER_DEPRECATED | E_DEPRECATED, $execution);
165165
}
166166

167-
protected function assertError(int $levels, callable $execution): void
167+
protected function assertError(int $levels, callable $execution): mixed
168168
{
169169
$errors = [];
170170

0 commit comments

Comments
 (0)