@@ -45,7 +45,24 @@ function mockBuilder($types = null, $definition = null, $className = null)
4545}
4646
4747/**
48- * Create a new mock.
48+ * Create a new full mock.
49+ *
50+ * @param string|ReflectionClass|MockBuilderInterface|array<string|ReflectionClass|MockBuilderInterface>|null $types The types to mock.
51+ * @param array|object|null $definition The definition.
52+ * @param string|null $className The class name.
53+ *
54+ * @return InstanceStubbingProxyInterface A stubbing proxy around the new mock.
55+ */
56+ function mock ($ types = null , $ definition = null , $ className = null )
57+ {
58+ return on (
59+ PhpunitFacadeDriver::instance ()->mockBuilderFactory ()
60+ ->createFullMock ($ types , $ definition , $ className )
61+ );
62+ }
63+
64+ /**
65+ * Create a new partial mock.
4966 *
5067 * @param string|ReflectionClass|MockBuilderInterface|array<string|ReflectionClass|MockBuilderInterface>|null $types The types to mock.
5168 * @param ArgumentsInterface|array|null $arguments The constructor arguments, or null to bypass the constructor.
@@ -54,40 +71,23 @@ function mockBuilder($types = null, $definition = null, $className = null)
5471 *
5572 * @return InstanceStubbingProxyInterface A stubbing proxy around the new mock.
5673 */
57- function mock (
74+ function partialMock (
5875 $ types = null ,
5976 $ arguments = null ,
6077 $ definition = null ,
6178 $ className = null
6279) {
6380 if (func_num_args () > 1 ) {
6481 $ mock = PhpunitFacadeDriver::instance ()->mockBuilderFactory ()
65- ->createMock ($ types , $ arguments , $ definition , $ className );
82+ ->createPartialMock ($ types , $ arguments , $ definition , $ className );
6683 } else {
6784 $ mock = PhpunitFacadeDriver::instance ()->mockBuilderFactory ()
68- ->createMock ($ types );
85+ ->createPartialMock ($ types );
6986 }
7087
7188 return on ($ mock );
7289}
7390
74- /**
75- * Create a new full mock.
76- *
77- * @param string|ReflectionClass|MockBuilderInterface|array<string|ReflectionClass|MockBuilderInterface>|null $types The types to mock.
78- * @param array|object|null $definition The definition.
79- * @param string|null $className The class name.
80- *
81- * @return InstanceStubbingProxyInterface A stubbing proxy around the new mock.
82- */
83- function fullMock ($ types = null , $ definition = null , $ className = null )
84- {
85- return on (
86- PhpunitFacadeDriver::instance ()->mockBuilderFactory ()
87- ->createFullMock ($ types , $ definition , $ className )
88- );
89- }
90-
9191/**
9292 * Create a new stubbing proxy.
9393 *
0 commit comments