Skip to content

Commit a148a80

Browse files
committed
release v1.2.0
1 parent bdc5472 commit a148a80

File tree

4 files changed

+20
-10
lines changed

4 files changed

+20
-10
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# v1.2.0
2+
* do not regenerate mocks if already present (#18)
3+
* added configuration for addition of doc blocks (#15)
4+
* also add primitives as members of the test case (#14)
5+
* provide no intention for classes without constructor (#13)
6+
17
# v1.1.0
28
* added ObjectProphecy doc (#8)
39
* show intention if there are whitespaces between parenthesis (#7)

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,16 @@ When writing tests for classes with constructor dependencies (e.g. every compose
1010
Templates" can help with the test case skeleton, the actual class dependencies have to be mocked manually.
1111

1212
Now, you can use this PHPStorm plugin to automatically generate mocks for these dependencies. Place your cursor in the empty
13-
constructor argument list, trigger code intentions (default: `ALT + ENTER`) and select `Create mocks for all parameters
14-
of the constructor` - done!
13+
constructor argument list, trigger code intentions (default: `ALT + ENTER`) and select `Quick Mock: add constructor prophecies` - done!
1514

1615
## Install
1716
Install the plugin by going to `Settings -> Plugins -> Browse repositories` and then search for `Quick Mock`
1817

18+
## Options
19+
You can configure the plugin under `Languages and Frameworks -> PHP -> Quick Mock`. Available options:
20+
21+
* add DocBlock for generated members: if checked, a DocBlock will be generated for generated mock members
22+
1923
## Usage
2024
Let's assume you have this business service:
2125

@@ -63,8 +67,8 @@ Whenever you begin writing a unit test case, you will inevitably come to the sub
6367
}
6468
}
6569

66-
Place your cursor in the empty constructor argument list of a subject under test, trigger code intentions (default:
67-
`ALT + ENTER`) and select `Create mocks for all parameters of the constructor` - done!
70+
Place your cursor anywhere at the `new` expression of a subject under test, trigger code intentions (default:
71+
`ALT + ENTER`) and select `Quick Mock: add constructor prophecies` - done!
6872

6973

7074
use Psr\Log\LoggerInterface;

build.gradle

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ apply plugin: 'org.jetbrains.intellij'
1010
apply plugin: 'java'
1111

1212
group 'de.cawolf'
13-
version '1.1.0'
13+
version '1.2.0'
1414

1515
sourceCompatibility = 1.8
1616

@@ -41,8 +41,3 @@ intellij {
4141

4242
pluginName 'Quick Mock'
4343
}
44-
45-
publishPlugin {
46-
username hasProperty('intellijPublishUsername') ? intellijPublishUsername : 'foo'
47-
password hasProperty('intellijPublishPassword') ? intellijPublishPassword : 'bar'
48-
}

src/main/resources/META-INF/plugin.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99

1010
<change-notes><![CDATA[
1111
<dl>
12+
<dt>1.2.0</dt>
13+
<dd>do not regenerate mocks if already present (issue #18)</dd>
14+
<dd>added configuration for addition of doc blocks (issue #15)</dd>
15+
<dd>also add primitives as members of the test case (issue #14)</dd>
16+
<dd>provide no intention for classes without constructor (issue #13)</dd>
1217
<dt>1.1.0</dt>
1318
<dd>added ObjectProphecy doc (issue #8)</dd>
1419
<dd>show intention if there are whitespaces between parenthesis (issue #7)</dd>

0 commit comments

Comments
 (0)