Skip to content

Commit

Permalink
Merge pull request #802 from ErikJson/master
Browse files Browse the repository at this point in the history
Fix minor documentation issues
  • Loading branch information
davedevelopment committed Oct 24, 2017
2 parents ef83f6f + 5c445f4 commit 89f27e4
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/cookbook/mockery_on.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ when called. If the closure returns ``true``, Mockery will consider that the
argument has passed the expectation. If the closure returns ``false``, or a
"falsey" value, the expectation will not pass.

The ``\Mockery::on()`` matcher can be used in various scenarios — validating
The ``\Mockery::on()`` matcher can be used in various scenarios validating
an array argument based on multiple keys and values, complex string matching...

Say, for example, we have the following code. It doesn't do much; publishes a
Expand Down
2 changes: 1 addition & 1 deletion docs/cookbook/not_calling_the_constructor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ A better approach is to use runtime partial doubles:
}
}
// This will print "Original constructor called."
// This will not print anything
$mock = \Mockery::mock('MyClass')->makePartial();
$mock->shouldReceive('foo');
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/expectations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ method which accepts one or more closure:
$mock->shouldReceive('name_of_method')
->andReturnUsing(closure, ...);
Closures can queued by passing them as extra parameters as for ``andReturn()``.
Closures can be queued by passing them as extra parameters as for ``andReturn()``.

.. note::

Expand Down
4 changes: 2 additions & 2 deletions docs/reference/final_methods_classes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Dealing with Final Classes/Methods
One of the primary restrictions of mock objects in PHP, is that mocking
classes or methods marked final is hard. The final keyword prevents methods so
marked from being replaced in subclasses (subclassing is how mock objects can
inherit the type of the class or object being mocked.
inherit the type of the class or object being mocked).

The simplest solution is not to mark classes or methods as final!
The simplest solution is to not mark classes or methods as final!

However, in a compromise between mocking functionality and type safety,
Mockery does allow creating "proxy mocks" from classes marked final, or from
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/pass_by_reference_behaviours.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ method) are reflected in the original variable. An example:
echo $baz; // will echo the integer 2
In the example above, the variable $baz is passed by reference to
In the example above, the variable ``$baz`` is passed by reference to
``Foo::bar()`` (notice the ``&`` symbol in front of the parameter?). Any
change ``bar()`` makes to the parameter reference is reflected in the original
variable, ``$baz``.
Expand Down

0 comments on commit 89f27e4

Please sign in to comment.