| @@ 29-44 (lines=16) @@ | ||
| 26 | exec("sh etc/bash/install_test_env.sh"); |
|
| 27 | } |
|
| 28 | ||
| 29 | public function testNonexistentTaskParentMutation() : void |
|
| 30 | { |
|
| 31 | $this->createTaskMutation( |
|
| 32 | 'access-token-1', |
|
| 33 | [ |
|
| 34 | 'clientMutationId' => '5c9fd085-cdda-49de-9272-39f304e3bd1f', |
|
| 35 | 'title' => 'The task title', |
|
| 36 | 'description' => 'The task description', |
|
| 37 | 'assigneeId' => '1106e034-d6b8-46c0-a393-9f0fd92d18a1', |
|
| 38 | 'priority' => 'HIGH', |
|
| 39 | 'projectId' => '0dadad5e-1220-11e7-93ae-92361f002671', |
|
| 40 | 'parentId' => 'nonexistent-parent-task-id', |
|
| 41 | ], |
|
| 42 | '/create_task_with_nonexistent_parent' |
|
| 43 | ); |
|
| 44 | } |
|
| 45 | ||
| 46 | public function testNonexistentProjectMutation() : void |
|
| 47 | { |
|
| @@ 46-61 (lines=16) @@ | ||
| 43 | ); |
|
| 44 | } |
|
| 45 | ||
| 46 | public function testNonexistentProjectMutation() : void |
|
| 47 | { |
|
| 48 | $this->createTaskMutation( |
|
| 49 | 'access-token-1', |
|
| 50 | [ |
|
| 51 | 'clientMutationId' => '5c9fd085-cdda-49de-9272-39f304e3bd1f', |
|
| 52 | 'title' => 'The task title', |
|
| 53 | 'description' => 'The task description', |
|
| 54 | 'assigneeId' => '1106e034-d6b8-46c0-a393-9f0fd92d18a1', |
|
| 55 | 'priority' => 'HIGH', |
|
| 56 | 'projectId' => 'nonexistent-project-id', |
|
| 57 | 'parentId' => null, |
|
| 58 | ], |
|
| 59 | '/create_task_with_nonexistent_project' |
|
| 60 | ); |
|
| 61 | } |
|
| 62 | ||
| 63 | public function testNotMemberAssigneeMutation() : void |
|
| 64 | { |
|
| @@ 63-78 (lines=16) @@ | ||
| 60 | ); |
|
| 61 | } |
|
| 62 | ||
| 63 | public function testNotMemberAssigneeMutation() : void |
|
| 64 | { |
|
| 65 | $this->createTaskMutation( |
|
| 66 | 'access-token-1', |
|
| 67 | [ |
|
| 68 | 'clientMutationId' => '5c9fd085-cdda-49de-9272-39f304e3bd1f', |
|
| 69 | 'title' => 'The task title', |
|
| 70 | 'description' => 'The task description', |
|
| 71 | 'assigneeId' => '8eb29ed7-93b2-4c94-bb9b-ad4b323ad8c5', |
|
| 72 | 'priority' => 'HIGH', |
|
| 73 | 'projectId' => '0dadad5e-1220-11e7-93ae-92361f002671', |
|
| 74 | 'parentId' => null, |
|
| 75 | ], |
|
| 76 | '/create_task_with_not_member_assignee' |
|
| 77 | ); |
|
| 78 | } |
|
| 79 | ||
| 80 | public function testUnauthorizedTaskCreationMutation() : void |
|
| 81 | { |
|
| @@ 80-95 (lines=16) @@ | ||
| 77 | ); |
|
| 78 | } |
|
| 79 | ||
| 80 | public function testUnauthorizedTaskCreationMutation() : void |
|
| 81 | { |
|
| 82 | $this->createTaskMutation( |
|
| 83 | 'access-token-2', |
|
| 84 | [ |
|
| 85 | 'clientMutationId' => '5c9fd085-cdda-49de-9272-39f304e3bd1f', |
|
| 86 | 'title' => 'The task title', |
|
| 87 | 'description' => 'The task description', |
|
| 88 | 'assigneeId' => '1106e034-d6b8-46c0-a393-9f0fd92d18a1', |
|
| 89 | 'priority' => 'HIGH', |
|
| 90 | 'projectId' => '0dadad5e-1220-11e7-93ae-92361f002671', |
|
| 91 | 'parentId' => null, |
|
| 92 | ], |
|
| 93 | '/create_task_with_not_member_creator' |
|
| 94 | ); |
|
| 95 | } |
|
| 96 | ||
| 97 | public function testCreateTaskMutation() : void |
|
| 98 | { |
|
| @@ 97-112 (lines=16) @@ | ||
| 94 | ); |
|
| 95 | } |
|
| 96 | ||
| 97 | public function testCreateTaskMutation() : void |
|
| 98 | { |
|
| 99 | $this->createTaskMutation( |
|
| 100 | 'access-token-1', |
|
| 101 | [ |
|
| 102 | 'clientMutationId' => '5c9fd085-cdda-49de-9272-39f304e3bd1f', |
|
| 103 | 'title' => 'The task title', |
|
| 104 | 'description' => 'The task description', |
|
| 105 | 'assigneeId' => '1106e034-d6b8-46c0-a393-9f0fd92d18a1', |
|
| 106 | 'priority' => 'HIGH', |
|
| 107 | 'projectId' => '0dadad5e-1220-11e7-93ae-92361f002671', |
|
| 108 | 'parentId' => null, |
|
| 109 | ], |
|
| 110 | '/create_task' |
|
| 111 | ); |
|
| 112 | } |
|
| 113 | ||
| 114 | public function testCreateTaskWithParentMutation() : void |
|
| 115 | { |
|
| @@ 114-129 (lines=16) @@ | ||
| 111 | ); |
|
| 112 | } |
|
| 113 | ||
| 114 | public function testCreateTaskWithParentMutation() : void |
|
| 115 | { |
|
| 116 | $this->createTaskMutation( |
|
| 117 | 'access-token-1', |
|
| 118 | [ |
|
| 119 | 'clientMutationId' => '5c9fd085-cdda-49de-9272-39f304e3bd1z', |
|
| 120 | 'title' => 'The task title with parent', |
|
| 121 | 'description' => 'The task description with parent', |
|
| 122 | 'assigneeId' => '1106e034-d6b8-46c0-a393-9f0fd92d18a1', |
|
| 123 | 'priority' => 'MEDIUM', |
|
| 124 | 'projectId' => '0dadad5e-1220-11e7-93ae-92361f002671', |
|
| 125 | 'parentId' => '42eb4c4c-1225-11e7-93ae-92361f002671', |
|
| 126 | ], |
|
| 127 | '/create_task_with_parent' |
|
| 128 | ); |
|
| 129 | } |
|
| 130 | ||
| 131 | private function createTaskMutation(string $token, array $input, string $jsonResult) : void |
|
| 132 | { |
|