Skip to content

Commit c81d8b5

Browse files
committed
Remove usage of setAccessible in tests
1 parent c80d78c commit c81d8b5

7 files changed

+0
-7
lines changed

tests/exception/bulkwriteexception-haserrorlabel-001.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ $labels = ['test', 'foo'];
99
$reflection = new ReflectionClass($exception);
1010

1111
$resultDocumentProperty = $reflection->getProperty('errorLabels');
12-
$resultDocumentProperty->setAccessible(true);
1312
$resultDocumentProperty->setValue($exception, $labels);
1413

1514
var_dump($exception->hasErrorLabel('foo'));

tests/exception/bulkwriteexception-haserrorlabel_error-001.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ $labels = 'shouldBeAnArray';
99
$reflection = new ReflectionClass($exception);
1010

1111
$resultDocumentProperty = $reflection->getProperty('errorLabels');
12-
$resultDocumentProperty->setAccessible(true);
1312
$resultDocumentProperty->setValue($exception, $labels);
1413

1514
var_dump($exception->hasErrorLabel('bar'));

tests/exception/commandexception-getresultdocument-001.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ $resultDocument = (object) ['x' => 1];
99
$reflection = new ReflectionClass($exception);
1010

1111
$resultDocumentProperty = $reflection->getProperty('resultDocument');
12-
$resultDocumentProperty->setAccessible(true);
1312
$resultDocumentProperty->setValue($exception, $resultDocument);
1413

1514
var_dump($resultDocument === $exception->getResultDocument());

tests/exception/commandexception-haserrorlabel-001.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ $labels = ['test', 'foo'];
99
$reflection = new ReflectionClass($exception);
1010

1111
$resultDocumentProperty = $reflection->getProperty('errorLabels');
12-
$resultDocumentProperty->setAccessible(true);
1312
$resultDocumentProperty->setValue($exception, $labels);
1413

1514
var_dump($exception->hasErrorLabel('foo'));

tests/exception/commandexception-haserrorlabel_error-001.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ $labels = 'shouldBeAnArray';
99
$reflection = new ReflectionClass($exception);
1010

1111
$resultDocumentProperty = $reflection->getProperty('errorLabels');
12-
$resultDocumentProperty->setAccessible(true);
1312
$resultDocumentProperty->setValue($exception, $labels);
1413

1514
var_dump($exception->hasErrorLabel('bar'));

tests/exception/runtimeexception-haserrorlabel-001.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ $labels = ['test', 'foo'];
99
$reflection = new ReflectionClass($exception);
1010

1111
$resultDocumentProperty = $reflection->getProperty('errorLabels');
12-
$resultDocumentProperty->setAccessible(true);
1312
$resultDocumentProperty->setValue($exception, $labels);
1413

1514
var_dump($exception->hasErrorLabel('foo'));

tests/exception/runtimeexception-haserrorlabel_error-001.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ $labels = 'shouldBeAnArray';
99
$reflection = new ReflectionClass($exception);
1010

1111
$resultDocumentProperty = $reflection->getProperty('errorLabels');
12-
$resultDocumentProperty->setAccessible(true);
1312
$resultDocumentProperty->setValue($exception, $labels);
1413

1514
var_dump($exception->hasErrorLabel('bar'));

0 commit comments

Comments
 (0)