Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
F
foodsharing
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
243
Issues
243
List
Boards
Labels
Service Desk
Milestones
Merge Requests
47
Merge Requests
47
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
foodsharing-dev
foodsharing
Commits
3b0227de
Commit
3b0227de
authored
Feb 12, 2018
by
Matthias Larisch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix codestyle
parent
4ebb9067
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
src/Dev/SeedCommand.php
src/Dev/SeedCommand.php
+7
-3
tests/_support/Helper/Foodsharing.php
tests/_support/Helper/Foodsharing.php
+2
-3
No files found.
src/Dev/SeedCommand.php
View file @
3b0227de
...
...
@@ -60,8 +60,13 @@ class SeedCommand extends Command implements CustomCommandInterface
{
$rand
=
array_rand
(
$this
->
foodsavers
,
$number
);
if
(
$number
===
1
)
return
$this
->
foodsavers
[
$rand
];
if
(
count
(
$rand
)
>
0
)
return
array_intersect_key
(
$this
->
foodsavers
,
$rand
);
if
(
$number
===
1
)
{
return
$this
->
foodsavers
[
$rand
];
}
if
(
count
(
$rand
)
>
0
)
{
return
array_intersect_key
(
$this
->
foodsavers
,
$rand
);
}
return
[];
}
...
...
@@ -109,7 +114,6 @@ class SeedCommand extends Command implements CustomCommandInterface
$I
->
addFairteilerFollower
(
$user2
[
'id'
],
$fairteiler
[
'id'
]);
$I
->
addFairteilerPost
(
$userbot
[
'id'
],
$fairteiler
[
'id'
]);
// create users and collect their ids in a list
$this
->
foodsavers
=
[
$user2
[
'id'
],
$userbot
[
'id'
],
$userorga
[
'id'
]];
foreach
(
range
(
0
,
100
)
as
$_
)
{
...
...
tests/_support/Helper/Foodsharing.php
View file @
3b0227de
...
...
@@ -244,14 +244,13 @@ class Foodsharing extends \Codeception\Module\Db
return
$params
;
}
public
function
addRecurringPickup
(
$store
,
$extra_params
=
[])
{
$params
=
array_merge
([
'betrieb_id'
=>
$store
,
'dow'
=>
$this
->
faker
->
numberBetween
(
0
,
6
),
'dow'
=>
$this
->
faker
->
numberBetween
(
0
,
6
),
'time'
=>
$this
->
faker
->
date
(
$format
=
'H:i:s'
,
$max
=
'now'
),
'fetcher'
=>
$this
->
faker
->
numberBetween
(
1
,
8
),
'fetcher'
=>
$this
->
faker
->
numberBetween
(
1
,
8
),
],
$extra_params
);
$id
=
$this
->
haveInDatabase
(
'fs_abholzeiten'
,
$params
);
...
...
Write
Preview
Markdown
is supported
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