[ 'output' => ['triggerid', 'description'], 'sortfield' => 'triggerid', 'editable' => true ], 'result' => [ ['triggerid' => '50104', 'description' => 'test-trigger-permissions-trigger-{W}'], ['triggerid' => '50118', 'description' => 'test-trigger-permissions-trigger-{NW}'], ['triggerid' => '50121', 'description' => 'test-trigger-permissions-trigger-{RW}'], ['triggerid' => '50124', 'description' => 'test-trigger-permissions-trigger-{NRW}'], ['triggerid' => '50163', 'description' => 'test-trigger-permissions-trigger-{W}-{NW}'], ['triggerid' => '50166', 'description' => 'test-trigger-permissions-trigger-{W}-{RW}'], ['triggerid' => '50169', 'description' => 'test-trigger-permissions-trigger-{W}-{NRW}'] ] ], [ 'request' => [ 'output' => ['triggerid', 'description'], 'sortfield' => 'triggerid' ], 'result' => [ ['triggerid' => '50103', 'description' => 'test-trigger-permissions-trigger-{R}'], ['triggerid' => '50104', 'description' => 'test-trigger-permissions-trigger-{W}'], ['triggerid' => '50110', 'description' => 'test-trigger-permissions-trigger-{R}-{W}'], ['triggerid' => '50117', 'description' => 'test-trigger-permissions-trigger-{NR}'], ['triggerid' => '50118', 'description' => 'test-trigger-permissions-trigger-{NW}'], ['triggerid' => '50121', 'description' => 'test-trigger-permissions-trigger-{RW}'], ['triggerid' => '50124', 'description' => 'test-trigger-permissions-trigger-{NRW}'], ['triggerid' => '50151', 'description' => 'test-trigger-permissions-trigger-{R}-{NR}'], ['triggerid' => '50152', 'description' => 'test-trigger-permissions-trigger-{R}-{NW}'], ['triggerid' => '50155', 'description' => 'test-trigger-permissions-trigger-{R}-{RW}'], ['triggerid' => '50158', 'description' => 'test-trigger-permissions-trigger-{R}-{NRW}'], ['triggerid' => '50162', 'description' => 'test-trigger-permissions-trigger-{W}-{NR}'], ['triggerid' => '50163', 'description' => 'test-trigger-permissions-trigger-{W}-{NW}'], ['triggerid' => '50166', 'description' => 'test-trigger-permissions-trigger-{W}-{RW}'], ['triggerid' => '50169', 'description' => 'test-trigger-permissions-trigger-{W}-{NRW}'] ] ] ]; } /** * @dataProvider getTriggerPermissions */ public function testTriggerPermissions_get($request, $result) { $this->authorize('test-trigger-permissions-user', 'zabbix'); $this->assertSame($result, $this->call('trigger.get', $request)['result']); } }