This commit is contained in:
2025-06-20 17:31:13 +02:00
parent 9158e33854
commit a38116cca4
65 changed files with 2298 additions and 2298 deletions

View File

@@ -54,6 +54,25 @@ final class ReportVoterTest extends KernelTestCase
$this->prophet = new \Prophecy\Prophet();
}
/**
* @dataProvider dataProvider
*
* @param type $expectedResult
* @param type $action
* @param type $message
*/
public function testAccess(
$expectedResult,
Report $report,
$action,
$message,
?User $user = null,
) {
$token = $this->prepareToken($user);
$result = $this->voter->vote($token, $report, [$action]);
$this->assertEquals($expectedResult, $result, $message);
}
public function dataProvider()
{
$centerA = $this->prepareCenter(1, 'center A');
@@ -120,25 +139,6 @@ final class ReportVoterTest extends KernelTestCase
];
}
/**
* @dataProvider dataProvider
*
* @param type $expectedResult
* @param type $action
* @param type $message
*/
public function testAccess(
$expectedResult,
Report $report,
$action,
$message,
?User $user = null,
) {
$token = $this->prepareToken($user);
$result = $this->voter->vote($token, $report, [$action]);
$this->assertEquals($expectedResult, $result, $message);
}
/**
* prepare a person.
*