projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d78c90
)
shorthand for mocking a class with a private constructor
author
Chuck Hagenbuch
<chuck@horde.org>
Mon, 21 Sep 2009 03:42:51 +0000
(23:42 -0400)
committer
Chuck Hagenbuch
<chuck@horde.org>
Mon, 21 Sep 2009 03:42:51 +0000
(23:42 -0400)
framework/Test/lib/Horde/Test/Case.php
patch
|
blob
|
history
diff --git
a/framework/Test/lib/Horde/Test/Case.php
b/framework/Test/lib/Horde/Test/Case.php
index
47f40f8
..
84b1d9e
100644
(file)
--- a/
framework/Test/lib/Horde/Test/Case.php
+++ b/
framework/Test/lib/Horde/Test/Case.php
@@
-1,4
+1,11
@@
<?php
class Horde_Test_Case extends PHPUnit_Framework_TestCase
{
+ /**
+ * Useful shorthand if you are mocking a class with a private constructor
+ */
+ public function getMockSkipConstructor($className, array $methods = array(), array $arguments = array(), $mockClassName = '')
+ {
+ return $this->getMock($className, $methods, $arguments, $mockClassName, /* $callOriginalConstructor */ false);
+ }
}