Skip to content

Commit

Permalink
fix descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
maxfilatov committed Mar 21, 2015
1 parent 3c61658 commit d86a5fb
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 40 deletions.
41 changes: 37 additions & 4 deletions META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,51 @@
<idea-plugin version="2">
<id>com.phpuaca</id>
<name>PHPUnit Autocomplete Assistant</name>
<version>1.2-unstable</version>
<version>1.2</version>
<vendor url="https://github.com/maxfilatov/phpuaca/">Max Filatov</vendor>

<description><![CDATA[
<p>PhpStorm plugin to provide smart autocompletion for mocked class methods and properties.</p>
<div style="border-bottom: 1px dashed #cccccc; margin-bottom: 4px;">
<p>PhpStorm plugin to provide smart autocomplete for mocked class methods.</p>
<p>Features are available for method definition arguments of these PHPUnit methods:</p>
<ul>
<li><tt>PHPUnit_Framework_MockObject_MockBuilder::setMethods</tt></li>
<li><tt>PHPUnit_Framework_TestCase::getMock</tt></li>
<li><tt>PHPUnit_Framework_TestCase::getMockClass</tt></li>
<li><tt>PHPUnit_Framework_TestCase::getMockForAbstractClass</tt></li>
<li><tt>PHPUnit_Framework_TestCase::getMockForTrait</tt></li>
<li><tt>PHPUnit_Framework_MockObject_Builder_InvocationMocker::method</tt></li>
</ul>
</div>
<div style="border-bottom: 1px dashed #cccccc; margin-bottom: 4px; padding-bottom: 4px;">
<p>Example #1: autocomplete for argument <tt>$methods</tt> of <tt>PHPUnit_Framework_MockObject_MockBuilder::setMethods</tt></p>
<p><img src="https://raw.githubusercontent.com/maxfilatov/phpuaca/unstable/img/pmb.png" alt="" width="346" height="186" /></p>
</div>
<div style="border-bottom: 1px dashed #cccccc; padding-bottom: 4px;">
<p>Example #2: autocomplete for argument <tt>$constraint</tt> of <tt>PHPUnit_Framework_MockObject_Builder_InvocationMocker::method</tt></p>
<p><img src="https://raw.githubusercontent.com/maxfilatov/phpuaca/unstable/img/pim.png" alt="" width="346" height="340" /></p>
</div>
]]></description>

<change-notes><![CDATA[
<h3>1.2</h3>
<ul>
<li>Fixed false activation of plugin in classes with magic methods defined in PHPDoc blocks.</li>
</ul>
<h3>1.1</h3>
<ul>
<li>Added support for methods <tt>PHPUnit_Framework_TestCase::getMock</tt>, <tt>PHPUnit_Framework_TestCase::getMockClass</tt>, <tt>PHPUnit_Framework_TestCase::getMockForAbstractClass</tt> and <tt>PHPUnit_Framework_TestCase::getMockForTrait</tt>;</li>
<li>Already specified methods in mock definitions aren't used in next autocomplete suggestions;</li>
<li>Fixed multiple false activations of suggestion popup.</li>
</ul>
<h3>1.0</h3>
<ul>
<li>Added support for methods <tt>PHPUnit_Framework_MockObject_MockBuilder::setMethods</tt> and <tt>PHPUnit_Framework_MockObject_Builder_InvocationMocker::method</tt>.</li>
</ul>
]]>
</change-notes>

<idea-version since-build="131"/>
<idea-version since-build="133"/>

<depends>com.jetbrains.php</depends>
<depends>com.intellij.modules.platform</depends>
Expand All @@ -31,4 +64,4 @@
<actions>
</actions>

</idea-plugin>
</idea-plugin>
54 changes: 18 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
PHPUnit Autocomplete Assistant
==============================
PhpStorm plugin to provide smart autocompletion for mocked class methods and properties.
PhpStorm plugin to provide smart autocomplete for mocked class methods.

Supported versions of PhpStorm: 7.1, 8
Supported versions of PhpStorm: 7.1, 8.

Features are available for method definition arguments of these PHPUnit methods:
* `PHPUnit_Framework_MockObject_MockBuilder::setMethods`
* `PHPUnit_Framework_TestCase::getMock`
* `PHPUnit_Framework_TestCase::getMockClass`
* `PHPUnit_Framework_TestCase::getMockForAbstractClass`
* `PHPUnit_Framework_TestCase::getMockForTrait`
* `PHPUnit_Framework_MockObject_Builder_InvocationMocker::method`

Example #1: autocomplete for argument `$methods` of `PHPUnit_Framework_MockObject_MockBuilder::setMethods`

![PHPUnit_Framework_MockObject_MockBuilder::setMethods](https://raw.githubusercontent.com/maxfilatov/phpuaca/unstable/img/pmb.png)

Example #2: autocomplete for argument `$constraint` of `PHPUnit_Framework_MockObject_Builder_InvocationMocker::method`

![PHPUnit_Framework_MockObject_Builder_InvocationMocker::method](https://raw.githubusercontent.com/maxfilatov/phpuaca/unstable/img/pim.png)

Releases
--------
Expand All @@ -13,37 +29,3 @@ Installation
------------
* Go to `PhpStorm -> Preferences... -> Plugins -> Install plugin from disk...` and choose `phpuaca.jar`
* Restart PhpStorm

Demo
----
* `PHPUnit_Framework_MockObject_MockBuilder::setMethods`
![PHPUnit_Framework_MockObject_MockBuilder::setMethods](https://raw.githubusercontent.com/maxfilatov/phpuaca/master/img/mock_builder_set_methods.png)

* `PHPUnit_Framework_MockObject_Builder_InvocationMocker::method`
![PHPUnit_Framework_MockObject_Builder_InvocationMocker::method](https://raw.githubusercontent.com/maxfilatov/phpuaca/master/img/invocation_mocker_method.png)

List of supported methods
-------------------------
* **PHPUnit**
* `PHPUnit_Framework_MockObject_MockBuilder::setMethods`
* `PHPUnit_Framework_TestCase::getMock`
* `PHPUnit_Framework_TestCase::getMockClass`
* `PHPUnit_Framework_TestCase::getMockForAbstractClass`
* `PHPUnit_Framework_TestCase::getMockForTrait`
* `PHPUnit_Framework_MockObject_Builder_InvocationMocker::method`
* **PHPUnit Helper**
* `PHPUnit_Helper::getProtectedPropertyValue`
* `PHPUnit_Helper::setProtectedPropertyValue`
* `PHPUnit_Helper::callProtectedMethod`
* **Method Mock**
* `MethodMock::resetMethodCalledStack`
* `MethodMock::getCalledArgs`
* `MethodMock::isMethodCalled`
* `MethodMock::countMethodCalled`
* `MethodMock::revertMethod`
* `MethodMock::interceptMethodByCode`
* `MethodMock::interceptMethod`
* `MethodMock::mockMethodResult`
* `MethodMock::mockMethodResultByMap`
* `MethodMock::revertMethodResult`
* `MethodMock::callProtectedMethod`

0 comments on commit d86a5fb

Please sign in to comment.