Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
s2low
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
Container Registry
Model registry
Operate
Environments
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
Libriciel
s2low
Commits
902082ac
Commit
902082ac
authored
3 weeks ago
by
cdutheil
Browse files
Options
Downloads
Patches
Plain Diff
1247(test):
-Ajout un test KO pour actes_transac_cancel
parent
2fb940c6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
integration_tests/EndpointActeAPI/CancelTransactionTest.php
+20
-7
20 additions, 7 deletions
integration_tests/EndpointActeAPI/CancelTransactionTest.php
with
20 additions
and
7 deletions
integration_tests/EndpointActeAPI/CancelTransactionTest.php
+
20
−
7
View file @
902082ac
...
...
@@ -27,25 +27,38 @@ class CancelTransactionTest extends S2lowIntegrationTestCase
return
$this
->
actesTransactionsSQL
;
}
public
function
testShouldReturnOk
():
void
protected
function
dataprovider
():
array
{
return
[
[
true
,
'OK'
],
[
false
,
'KO'
],
];
}
/**
* @dataProvider dataProvider
*/
public
function
testShouldReturnOk
(
$isRealTransactionId
,
$stringInResponse
):
void
{
$client
=
$this
->
getAuthenticatedClientWithUserLoggedAs
(
UserRole
::
Utilisateur
);
$transactionId
=
$this
->
createTransaction
(
ActesStatusSQL
::
STATUS_ACQUITTEMENT_RECU
);
if
(
$isRealTransactionId
)
{
$transactionId
=
$this
->
createTransaction
(
ActesStatusSQL
::
STATUS_ACQUITTEMENT_RECU
);
}
else
{
$transactionId
=
23664
;
}
$api
=
1
;
$id
=
$transactionId
;
$_POST
[
'api'
]
=
$api
;
$_POST
[
'id'
]
=
$
i
d
;
$_POST
[
'id'
]
=
$
transactionI
d
;
$client
->
request
(
'POST'
,
'/modules/actes/actes_transac_cancel.php'
,
[
'api'
=>
$api
,
'id'
=>
$
i
d
,
'id'
=>
$
transactionI
d
,
]);
$response
=
$client
->
getResponse
();
static
::
assertStringContainsString
(
'OK'
,
$response
->
getContent
());
static
::
assertStringContainsString
(
$stringInResponse
,
$response
->
getContent
());
}
}
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