Skip to content

Commit e562481

Browse files
Update apps/settings/tests/Command/AdminDelegation/AddTest.php
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Mikhailo Matiyenko-Kupriyanov <145785698+printminion-co@users.noreply.github.com>
1 parent 13a5410 commit e562481

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

apps/settings/tests/Command/AdminDelegation/AddTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,7 @@ protected function setUp(): void {
4747
* Helper method to execute the command using reflection since execute() is protected
4848
*/
4949
private function executeCommand(): int {
50-
$reflection = new \ReflectionClass($this->command);
51-
$method = $reflection->getMethod('execute');
52-
$method->setAccessible(true);
53-
return $method->invokeArgs($this->command, [$this->input, $this->output]);
50+
return self::invokePrivate($this->command, 'execute', [$this->input, $this->output]);
5451
}
5552

5653
public function testExecuteSuccessfulDelegation(): void {

0 commit comments

Comments
 (0)