-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathfixtures.yml
86 lines (81 loc) · 2.51 KB
/
fixtures.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
## This file contains some basic sample fixtures, you'll likely want to amend for your use case.
## Attachments
Hellonico\Fixtures\Entity\Attachment:
default (template):
post_title: <words(2, true)>
pics{1..15} (extends default):
file: <picsum(<uploadDir()>, 1200, 1200)>
## Terms
Hellonico\Fixtures\Entity\Term:
category{1..10}:
name (unique): <words(2, true)> # '(unique)' is required
description: <sentence()>
parent: '50%? <termId(childless=1)>' # 50% of created categories will have a top level parent category
tag{1..100}:
__construct: ['post_tag']
name (unique): <words(2, true)> # '(unique)' is required
taxonomy: post_tag
Hellonico\Fixtures\Entity\Post:
## Pages
home_page:
post_title: Homepage
post_type: page
post_status: publish
meta:
_wp_page_template: front-page.php
about_page:
post_title: About
post_type: page
post_status: publish
post_content: <paragraphs(5, true)>
cookie_policy:
post_title: Cookies Policy
post_type: page
post_status: publish
post_content: <paragraphs(5, true)>
privacy_policy:
post_title: Privacy Policy
post_status: publish
post_type: page
post_content: <paragraphs(5, true)>
terms_and_conditions:
post_title: Terms and Conditions
post_status: publish
post_type: page
post_content: <paragraphs(5, true)>
## Posts
default (template):
post_title: <words(2, true)>
post_date: <dateTimeThisDecade()>
post_content: <paragraphs(5, true)>
post_excerpt: <paragraphs(1, true)>
meta:
_thumbnail_id: '@pics*->ID'
post{1..30} (extends default):
post_category: '1x @category*->term_id'
tax_input:
post_tag: '5x @tag*->term_id'
post_sample (extends default):
post_title: Sample Post
## Menu
Hellonico\Fixtures\Entity\NavMenu:
main_menu:
name: Main Menu
locations:
- main_menu
footer_menu:
name: Footer
locations:
- footer_menu
## Menu Items
Hellonico\Fixtures\Entity\NavMenuItem:
home:
menu_item_object: '@home_page'
menu_id: '@main_menu->term_id'
about:
menu_item_object: '@about_page'
menu_id: '@main_menu->term_id'
menu_item_parent_id: '@home->ID'
about_footer:
menu_item_object: '@about_page'
menu_id: '@footer_menu->term_id'