Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
qfq
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
typo3
qfq
Commits
5ff8e167
Commit
5ff8e167
authored
1 year ago
by
Carsten Rose
Browse files
Options
Downloads
Patches
Plain Diff
Refs #15790 - Update unit tests
parent
afbbde6a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Pipeline
#11136
passed
1 year ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
extension/Tests/Unit/Core/Form/DirtyTest.php
+11
-9
11 additions, 9 deletions
extension/Tests/Unit/Core/Form/DirtyTest.php
with
11 additions
and
9 deletions
extension/Tests/Unit/Core/Form/DirtyTest.php
+
11
−
9
View file @
5ff8e167
...
...
@@ -9,7 +9,7 @@
namespace
IMATHUZH\Qfq\Tests\Unit\Core\Form
;
use
IMATHUZH\Qfq\Core\Database\Database
;
use
IMATHUZH\Qfq\Core\Form\Dirty
;
use
IMATHUZH\Qfq\Core\Store\Session
;
use
IMATHUZH\Qfq\Core\Store\Sip
;
...
...
@@ -17,6 +17,8 @@ use IMATHUZH\Qfq\Tests\Unit\Core\Database\AbstractDatabaseTest;
require_once
(
__DIR__
.
'/../Database/AbstractDatabaseTest.php'
);
const
MSG_RECORD_ALREADY_LOCKED
=
'Record already locked'
;
/*
* Open to check
* - FORM_DELETE
...
...
@@ -352,7 +354,7 @@ class DirtyTest extends AbstractDatabaseTest {
// Alice lock again
$result
=
$dirty
->
process
();
$msg
=
'Record already locked '
;
$msg
=
MSG_RECORD_ALREADY_LOCKED
;
$expected
=
[
API_STATUS
=>
API_ANSWER_STATUS_CONFLICT_ALLOW_FORCE
,
API_MESSAGE
=>
$msg
];
// cut IP, User and Timestamp
...
...
@@ -508,7 +510,7 @@ class DirtyTest extends AbstractDatabaseTest {
$result
=
$dirty
->
process
();
$msg
=
'Record already locked '
;
$msg
=
MSG_RECORD_ALREADY_LOCKED
;
$expected
=
[
API_STATUS
=>
API_ANSWER_STATUS_CONFLICT_ALLOW_FORCE
,
API_MESSAGE
=>
$msg
];
// cut IP, User and Timestamp
...
...
@@ -700,8 +702,8 @@ class DirtyTest extends AbstractDatabaseTest {
// Alice lock again
$result
=
$dirty
->
process
();
$msg
=
'Record already locked '
;
$expected
=
[
API_STATUS
=>
API_ANSWER_STATUS_CONFLICT
,
API_MESSAGE
=>
$msg
];
$msg
=
MSG_RECORD_ALREADY_LOCKED
;
$expected
=
[
API_STATUS
=>
API_ANSWER_STATUS_CONFLICT
_ALLOW_FORCE
,
API_MESSAGE
=>
$msg
];
// cut IP, User and Timestamp
$result
[
API_MESSAGE
]
=
substr
(
$result
[
API_MESSAGE
],
0
,
strlen
(
$msg
));
...
...
@@ -855,7 +857,7 @@ class DirtyTest extends AbstractDatabaseTest {
$result
=
$dirty
->
process
();
$msg
=
'Record already locked '
;
$msg
=
MSG_RECORD_ALREADY_LOCKED
;
$expected
=
[
API_STATUS
=>
API_ANSWER_STATUS_CONFLICT
,
API_MESSAGE
=>
$msg
];
// cut IP, User and Timestamp
...
...
@@ -977,7 +979,7 @@ class DirtyTest extends AbstractDatabaseTest {
$result
=
$dirty
->
process
();
$msg
=
'Record already locked '
;
$msg
=
MSG_RECORD_ALREADY_LOCKED
;
$expected
=
[
API_STATUS
=>
API_ANSWER_STATUS_CONFLICT_ALLOW_FORCE
,
API_MESSAGE
=>
$msg
];
// cut IP, User and Timestamp
...
...
@@ -1065,7 +1067,7 @@ class DirtyTest extends AbstractDatabaseTest {
$result
=
$dirty
->
process
();
$msg
=
'Record already locked '
;
$msg
=
MSG_RECORD_ALREADY_LOCKED
;
$expected
=
[
API_STATUS
=>
API_ANSWER_STATUS_CONFLICT
,
API_MESSAGE
=>
$msg
];
// cut IP, User and Timestamp
...
...
@@ -1109,7 +1111,7 @@ class DirtyTest extends AbstractDatabaseTest {
$result
=
$dirty
->
process
();
$msg
=
'Record already locked '
;
$msg
=
MSG_RECORD_ALREADY_LOCKED
;
$expected
=
[
API_STATUS
=>
API_ANSWER_STATUS_CONFLICT
,
API_MESSAGE
=>
$msg
];
// cut IP, User and Timestamp
...
...
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