Skip to content

Commit de06231

Browse files
committed
docs: update README
1 parent a11e1f2 commit de06231

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ This patcher allows replacement of global functions that can't be mocked by PHPU
9090

9191
But it has a few limitations. Some functions can't be replaced and it might cause errors.
9292

93-
So by default we can replace only a dozen pre-defined functions in [FunctionPatcher](https://github.com/kenjis/ci-phpunit-test/blob/a4f8ceb4b96650529565be23a77f5dfcda8d4cce/application/tests/_ci_phpunit_test/patcher/3.x/Patcher/FunctionPatcher.php#L27-L44).
93+
So by default we can replace only a dozen pre-defined functions in [FunctionPatcher](https://github.com/kenjis/monkey-patch/blob/a11e1f227234dadeae2460d29b9c8ca6e91c88de/src/Patcher/FunctionPatcher.php#L31-L49).
9494

9595
~~~php
9696
public function test_index()
@@ -103,7 +103,7 @@ So by default we can replace only a dozen pre-defined functions in [FunctionPatc
103103
}
104104
~~~
105105

106-
[MonkeyPatch::patchFunction()]() replaces PHP native function `mt_rand()` in `Welcome::index` method, and it will return `100` in the test method.
106+
`MonkeyPatch::patchFunction()` replaces PHP native function `mt_rand()` in `Welcome::index` method, and it will return `100` in the test method.
107107

108108
**Note:** If you call `MonkeyPatch::patchFunction()` without 3rd argument, all the functions (located in `include_paths` and not in `exclude_paths`) called in the test method will be replaced. So, for example, a function in CodeIgniter code might be replaced and it results in unexpected outcome.
109109

@@ -138,7 +138,7 @@ You could change return value of patched function using PHP closure:
138138

139139
#### Patch Other Functions
140140

141-
If you want to patch other functions, you can add them to [functions_to_patch](https://github.com/kenjis/ci-phpunit-test/blob/a4f8ceb4b96650529565be23a77f5dfcda8d4cce/application/tests/Bootstrap.php#L369-L371) in `MonkeyPatchManager::init()`.
141+
If you want to patch other functions, you can add them to [functions_to_patch](hhttps://github.com/kenjis/monkey-patch/blob/a11e1f227234dadeae2460d29b9c8ca6e91c88de/src/bootstrap.php#L56-L59) in `MonkeyPatchManager::init()`.
142142

143143
But there are a few known limitations:
144144

@@ -180,7 +180,7 @@ This patcher allows replacement of constant value.
180180
}
181181
~~~
182182

183-
[MonkeyPatch::patchConstant()]() replaces the return value of the constant `ENVIRONMENT` in `Welcome::index` method.
183+
``MonkeyPatch::patchConstant()` replaces the return value of the constant `ENVIRONMENT` in `Welcome::index` method.
184184

185185
There are a few known limitations:
186186

0 commit comments

Comments
 (0)