File tree Expand file tree Collapse file tree 11 files changed +38
-38
lines changed
Expand file tree Collapse file tree 11 files changed +38
-38
lines changed Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ The main idea is simple: register Listener of PHPUnit and call Mocker at first.
1919
2020 use PHPUnit\Runner\BeforeTestHook;
2121 use PHPUnit\Runner\BeforeFirstTestHook;
22- use Xepozz\InternalFunctionMocker \Mocker;
23- use Xepozz\InternalFunctionMocker \MockerState;
22+ use Xepozz\InternalMocker \Mocker;
23+ use Xepozz\InternalMocker \MockerState;
2424
2525 final class MockerExtension implements BeforeTestHook, BeforeFirstTestHook
2626 {
@@ -112,7 +112,7 @@ class ServiceTest extends TestCase
112112```
113113
114114See full example
115- in [ ` \Xepozz\InternalFunctionMocker \Tests\Integration\DateTimeTest::testRun2 ` ] ( tests/Integration/DateTimeTest.php )
115+ in [ ` \Xepozz\InternalMocker \Tests\Integration\DateTimeTest::testRun2 ` ] ( tests/Integration/DateTimeTest.php )
116116
117117#### Pre-defined mock
118118
Original file line number Diff line number Diff line change 11{
2- "name" : " xepozz/internal-function-mock " ,
2+ "name" : " xepozz/internal-mocker " ,
33 "type" : " library" ,
44 "autoload" : {
55 "psr-4" : {
6- "Xepozz\\ InternalFunctionMocker \\ " : " src/"
6+ "Xepozz\\ InternalMocker \\ " : " src/"
77 }
88 },
99 "autoload-dev" : {
1010 "psr-4" : {
11- "Xepozz\\ InternalFunctionMocker \\ Tests\\ " : " tests/"
11+ "Xepozz\\ InternalMocker \\ Tests\\ " : " tests/"
1212 }
1313 },
1414 "authors" : [
Original file line number Diff line number Diff line change 1111 resolveDependencies =" true" >
1212
1313 <extensions >
14- <extension class =" Xepozz\InternalFunctionMocker \Tests\Listener" />
14+ <extension class =" Xepozz\InternalMocker \Tests\Listener" />
1515 </extensions >
1616 <php >
1717 <ini name =" error_reporting" value =" -1" />
Original file line number Diff line number Diff line change 11<?php
22declare (strict_types=1 );
33
4- namespace Xepozz \InternalFunctionMocker ;
4+ namespace Xepozz \InternalMocker ;
55
66use Yiisoft \VarDumper \VarDumper ;
77
Original file line number Diff line number Diff line change 11<?php
22declare (strict_types=1 );
33
4- namespace Xepozz \InternalFunctionMocker ;
4+ namespace Xepozz \InternalMocker ;
55
66final class MockerState
77{
Original file line number Diff line number Diff line change 11<?php
22declare (strict_types=1 );
33
4- namespace Xepozz \InternalFunctionMocker \Tests \Integration ;
4+ namespace Xepozz \InternalMocker \Tests \Integration ;
55
66class DateTime
77{
Original file line number Diff line number Diff line change 11<?php
22declare (strict_types=1 );
33
4- namespace Xepozz \InternalFunctionMocker \Tests \Integration ;
4+ namespace Xepozz \InternalMocker \Tests \Integration ;
55
66use PHPUnit \Framework \TestCase ;
7- use Xepozz \InternalFunctionMocker \MockerState ;
7+ use Xepozz \InternalMocker \MockerState ;
88
99final class DateTimeTest extends TestCase
1010{
@@ -20,7 +20,7 @@ public function testRun2()
2020 $ obj = new DateTime ();
2121
2222 MockerState::addCondition (
23- 'Xepozz\InternalFunctionMocker \Tests\Integration ' ,
23+ 'Xepozz\InternalMocker \Tests\Integration ' ,
2424 'time ' ,
2525 [],
2626 100
Original file line number Diff line number Diff line change 11<?php
22declare (strict_types=1 );
33
4- namespace Xepozz \InternalFunctionMocker \Tests \Integration ;
4+ namespace Xepozz \InternalMocker \Tests \Integration ;
55
66class StrContains
77{
Original file line number Diff line number Diff line change 11<?php
22declare (strict_types=1 );
33
4- namespace Xepozz \InternalFunctionMocker \Tests \Integration ;
4+ namespace Xepozz \InternalMocker \Tests \Integration ;
55
66use PHPUnit \Framework \TestCase ;
7- use Xepozz \InternalFunctionMocker \MockerState ;
7+ use Xepozz \InternalMocker \MockerState ;
88
99class StrContainsTest extends TestCase
1010{
@@ -34,7 +34,7 @@ public function testRun4()
3434 $ obj = new StrContains ();
3535
3636 MockerState::addCondition (
37- 'Xepozz\InternalFunctionMocker \Tests\Integration ' ,
37+ 'Xepozz\InternalMocker \Tests\Integration ' ,
3838 'str_contains ' ,
3939 ['string4 ' , 'str ' ],
4040 false
Original file line number Diff line number Diff line change 11<?php
22declare (strict_types=1 );
33
4- namespace Xepozz \InternalFunctionMocker \Tests ;
4+ namespace Xepozz \InternalMocker \Tests ;
55
66use PHPUnit \Runner \BeforeFirstTestHook ;
77use PHPUnit \Runner \BeforeTestHook ;
8- use Xepozz \InternalFunctionMocker \Mocker ;
9- use Xepozz \InternalFunctionMocker \MockerState ;
8+ use Xepozz \InternalMocker \Mocker ;
9+ use Xepozz \InternalMocker \MockerState ;
1010
1111final class Listener implements BeforeFirstTestHook, BeforeTestHook
1212{
1313 public function executeBeforeFirstTest (): void
1414 {
1515 $ mocks = [
1616 [
17- 'namespace ' => 'Xepozz\InternalFunctionMocker \Tests\Integration ' ,
17+ 'namespace ' => 'Xepozz\InternalMocker \Tests\Integration ' ,
1818 'name ' => 'time ' ,
1919 'result ' => 555 ,
2020 'arguments ' => [],
2121 ],
2222 [
23- 'namespace ' => 'Xepozz\InternalFunctionMocker \Tests\Integration ' ,
23+ 'namespace ' => 'Xepozz\InternalMocker \Tests\Integration ' ,
2424 'name ' => 'str_contains ' ,
2525 'result ' => false ,
2626 'arguments ' => [
@@ -29,7 +29,7 @@ public function executeBeforeFirstTest(): void
2929 ],
3030 ],
3131 [
32- 'namespace ' => 'Xepozz\InternalFunctionMocker \Tests\Integration ' ,
32+ 'namespace ' => 'Xepozz\InternalMocker \Tests\Integration ' ,
3333 'name ' => 'str_contains ' ,
3434 'result ' => false ,
3535 'arguments ' => [
You can’t perform that action at this time.
0 commit comments