Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Madis Cyber
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Soluris
Madis Cyber
Commits
5cff8fd7
Commit
5cff8fd7
authored
2 years ago
by
Jonathan Foucher
Browse files
Options
Downloads
Patches
Plain Diff
cs fix
parent
65ecdd20
No related branches found
No related tags found
No related merge requests found
Pipeline
#31942
passed
2 years ago
Stage: build
Stage: test
Stage: quality-assurance
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/Feature/GraphDataControllerTest.php
+26
-34
26 additions, 34 deletions
tests/Feature/GraphDataControllerTest.php
with
26 additions
and
34 deletions
tests/Feature/GraphDataControllerTest.php
+
26
−
34
View file @
5cff8fd7
...
...
@@ -33,9 +33,8 @@ public function testCheckEvaluationMeasuresGraphData()
$response
->
assertOk
();
$expected
=
array
(
'labels'
=>
array
(
$expected
=
[
'labels'
=>
[
0
=>
'Droits d\'accès logiques'
,
1
=>
'Cloisonnement réseaux'
,
2
=>
'Modes dégradés'
,
...
...
@@ -46,9 +45,8 @@ public function testCheckEvaluationMeasuresGraphData()
7
=>
'Sauvegardes'
,
8
=>
'MAJ'
,
9
=>
'Sensibilisation'
,
),
'data'
=>
array
(
],
'data'
=>
[
0
=>
2
,
1
=>
2
,
2
=>
2
,
...
...
@@ -59,8 +57,8 @@ public function testCheckEvaluationMeasuresGraphData()
7
=>
2
,
8
=>
2
,
9
=>
2
,
)
,
)
;
]
,
]
;
$this
->
assertEquals
(
$expected
,
$response
->
json
());
}
...
...
@@ -85,26 +83,24 @@ public function testCheckEvaluationRisksGraphData()
$response
->
assertOk
();
$expected
=
array
(
'labels'
=>
array
(
$expected
=
[
'labels'
=>
[
0
=>
'Sabotage, demande de rançon'
,
1
=>
'Vol, recel de données, publication de données des citoyens'
,
2
=>
'Détournement de fonds '
,
3
=>
'Détournement de ressources informatiques'
,
4
=>
'Défiguration du site internet'
,
5
=>
'Piratage de compte de messagerie'
,
),
'data'
=>
array
(
],
'data'
=>
[
0
=>
66.625
,
1
=>
64.83333333333333
,
2
=>
63.333333333333336
,
3
=>
66.625
,
4
=>
67.6
,
5
=>
66.66666666666667
,
)
,
)
;
]
,
]
;
$this
->
assertEquals
(
$expected
,
$response
->
json
());
}
...
...
@@ -131,9 +127,8 @@ public function testCheckEvaluationAttackGraphData()
$data
=
$response
->
json
();
$expected
=
array
(
'labels'
=>
array
(
$expected
=
[
'labels'
=>
[
0
=>
'Hameçonnage'
,
1
=>
'Installation non maitrisée'
,
2
=>
'Exploitation de vulnérabilités, défaut de mise à jour'
,
...
...
@@ -144,9 +139,8 @@ public function testCheckEvaluationAttackGraphData()
7
=>
'Usage d\'outils pro à titre privé'
,
8
=>
'Réseau WIFI, VOIP non sécurisée'
,
9
=>
'Intrusion via un prestataire ou éditeurs'
,
),
'data'
=>
array
(
],
'data'
=>
[
0
=>
60
,
1
=>
70
,
2
=>
61
,
...
...
@@ -157,8 +151,8 @@ public function testCheckEvaluationAttackGraphData()
7
=>
68
,
8
=>
68
,
9
=>
68
,
)
,
)
;
]
,
]
;
$this
->
assertEquals
(
$expected
,
$data
);
}
...
...
@@ -194,26 +188,24 @@ public function testCheckEvaluationExpositionGraphData()
$this
->
assertEquals
(
round
(
100
,
2
),
$vals
->
sum
());
$expected
=
array
(
'labels'
=>
array
(
$expected
=
[
'labels'
=>
[
0
=>
'Sabotage, demande de rançon'
,
1
=>
'Vol, recel de données, publication de données des citoyens'
,
2
=>
'Détournement de fonds '
,
3
=>
'Détournement de ressources informatiques'
,
4
=>
'Défiguration du site internet'
,
5
=>
'Piratage de compte de messagerie'
,
),
'data'
=>
array
(
],
'data'
=>
[
0
=>
16.83795964786656
,
1
=>
16.385156480350446
,
2
=>
16.00606545638347
,
3
=>
16.83795964786656
,
4
=>
17.084368813445096
,
5
=>
16.848489954087867
,
)
,
)
;
]
,
]
;
$this
->
assertEquals
(
$expected
,
$data
);
}
...
...
@@ -305,7 +297,7 @@ public function testEvaluationBestMeasures()
$data
=
$response
->
json
();
$expected
=
array
(
$expected
=
[
0
=>
1
,
1
=>
3
,
2
=>
2
,
...
...
@@ -316,7 +308,7 @@ public function testEvaluationBestMeasures()
7
=>
10
,
8
=>
4
,
9
=>
8
,
)
;
]
;
$this
->
assertEquals
(
$expected
,
$data
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment