Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
aa563f75
Commit
aa563f75
authored
Mar 25, 2017
by
Carsten Rose
Browse files
SaveTest.php: examine php unit problem on CI - added second test again, swapped update and insert.
parent
5122ffcc
Changes
1
Hide whitespace changes
Inline
Side-by-side
extension/qfq/tests/phpunit/SaveTest.php
View file @
aa563f75
...
...
@@ -17,7 +17,7 @@ require_once(__DIR__ . '/AbstractDatabaseTest.php');
class
SaveTest
extends
AbstractDatabaseTest
{
public
function
test
Insert
Record
()
{
public
function
test
Update
Record
()
{
$save
=
new
qfq\Save
(
array
(),
array
(),
array
());
$db
=
new
qfq\Database
();
...
...
@@ -25,17 +25,17 @@ class SaveTest extends AbstractDatabaseTest {
$values
=
[
'name'
=>
'Doe'
,
'firstName'
=>
'John'
];
$id
=
$save
->
insertRecord
(
'Person'
,
$values
);
$sql
=
"SELECT name, firstName FROM Person WHERE id = ? "
;
$values
=
[
'name'
=>
'Doe'
,
'firstName'
=>
'Big John'
];
$save
->
updateRecord
(
'Person'
,
$values
,
$id
);
$sql
=
"SELECT name, firstName FROM Person WHERE id = ? "
;
$result
=
$db
->
sql
(
$sql
,
ROW_REGULAR
,
[
$id
]);
$this
->
assertEquals
(
$values
,
$result
[
0
]);
}
public
function
testUpdateRecord
()
{
return
;
public
function
testInsertRecord
()
{
$save
=
new
qfq\Save
(
array
(),
array
(),
array
());
$db
=
new
qfq\Database
();
...
...
@@ -43,10 +43,8 @@ class SaveTest extends AbstractDatabaseTest {
$values
=
[
'name'
=>
'Doe'
,
'firstName'
=>
'John'
];
$id
=
$save
->
insertRecord
(
'Person'
,
$values
);
$values
=
[
'name'
=>
'Doe'
,
'firstName'
=>
'Big John'
];
$save
->
updateRecord
(
'Person'
,
$values
,
$id
);
$sql
=
"SELECT name, firstName FROM Person WHERE id = ? "
;
$result
=
$db
->
sql
(
$sql
,
ROW_REGULAR
,
[
$id
]);
$this
->
assertEquals
(
$values
,
$result
[
0
]);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment