Skip to content

Commit 4b4bc9a

Browse files
committed
new testbox packages and m2m features
1 parent e79fd56 commit 4b4bc9a

File tree

8 files changed

+526
-454
lines changed

8 files changed

+526
-454
lines changed

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## Changelog
22

3+
### v2.4.0
4+
- TestBox v2.4 Updates
5+
- New ORM property snippets m2m,o2m,m2o
6+
37
### v2.3.0
48
- Updated snippets for better usage in cfml plugin as well.
59
- Updated sublime completions for cfml plugins.

completions/ColdBox.sublime-completions

Lines changed: 458 additions & 453 deletions
Large diffs are not rendered by default.

messages.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"install": "readme.md",
33
"2.2.0": "changelog.md",
4-
"2.3.0": "changelog.md"
4+
"2.3.0": "changelog.md",
5+
"2.4.0": "changelog.md"
56
}

readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ Code completion for all major ColdBox + TestBox functions and scopes:
5555
- `entity ➝` : Creates an ORM Entity
5656
- `ormservice ➝` : Creates a Base ORM service
5757
- `virtualservice ➝` : Creates a virtual entity service
58+
- `o2m` : Creates a one-to-many property definition
59+
- `m2o` : Creates a many-to-one property definition
60+
- `m2m` : Creates a many-to-many property definition
5861

5962
### TestBox Snippets
6063

@@ -73,6 +76,7 @@ Code completion for all major ColdBox + TestBox functions and scopes:
7376
- `describe ➝` : A `describe` suite
7477
- `describeFull ➝` : A `describe` suite with all arguments
7578
- `expect ➝` : Starts an expectation DSL with a `toBe()` addition
79+
- `expectAll ➝` : Starts a collection expectation DSL with a `toBe()` addition
7680
- `expectFalse ➝` : Does a false expectation expression
7781
- `expectTrue ➝` : Does a true expectation expression
7882
- `expectToThrow ➝` : Starts an expectation that throws an exception

snippets/orm/m2m.sublime-snippet

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<snippet>
2+
<content><![CDATA[
3+
// O2M -> ${1:Name}
4+
property name="${1:Name}"
5+
fieldtype="many-to-many"
6+
type="array"
7+
lazy="extra"
8+
orderby="${2:orderby}"
9+
cascade="all"
10+
cfc="${3:cfc}"
11+
fkcolumn="${4:fk}"
12+
linktable="${5:link_table}"
13+
inversejoincolumn="${6:inverse_join}";
14+
]]></content>
15+
<tabTrigger>m2m</tabTrigger>
16+
<scope>source,text</scope>
17+
<description>Creates a many-to-many property</description>
18+
</snippet>

snippets/orm/m2o.sublime-snippet

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<snippet>
2+
<content><![CDATA[
3+
// M2O -> ${1:Name}
4+
property name="${1:Name}"
5+
cfc="${1:CFC}"
6+
fieldtype="many-to-one"
7+
fkcolumn="${2:fk}"
8+
lazy="true";
9+
]]></content>
10+
<tabTrigger>m2o</tabTrigger>
11+
<scope>source,text</scope>
12+
<description>Creates a many-to-one property</description>
13+
</snippet>

snippets/orm/o2m.sublime-snippet

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<snippet>
2+
<content><![CDATA[
3+
// O2M -> ${1:Name}
4+
property name="${1:Name}"
5+
singularName="${1:Name}"
6+
fieldtype="one-to-many"
7+
type="array"
8+
lazy="extra"
9+
batchsize="25"
10+
orderby="${2:orderBy}"
11+
cfc="${3:cfc}"
12+
fkcolumn="${4:fk}"
13+
inverse="true"
14+
cascade="all-delete-orphan";
15+
]]></content>
16+
<tabTrigger>o2m</tabTrigger>
17+
<scope>source,text</scope>
18+
<description>Creates a one-to-many property</description>
19+
</snippet>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<snippet>
2+
<content><![CDATA[
3+
expectAll( ${1} ).${2:toBe}( ${3} );
4+
]]></content>
5+
<tabTrigger>expectall</tabTrigger>
6+
<scope>source,text</scope>
7+
<description>TestBox ExpectAll</description>
8+
</snippet>

0 commit comments

Comments
 (0)