Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Renamed locally-declared test functions to prevent them colliding wit…

…h similar named functions in other unit tests
  • Loading branch information...
commit 32828d7765565d14951934c3dcdd68f4e705332e 1 parent 652e633
gordonmcvey authored
Showing with 11 additions and 11 deletions.
  1. +11 −11 _unittest/input/validate/prop/RequiredOnCallbackTest.php
View
22 _unittest/input/validate/prop/RequiredOnCallbackTest.php
@@ -3,9 +3,9 @@
namespace gordian\reefknot\input\validate\prop;
/* Simple callbacks for testing */
-function alwaysTrue () {return true;}
-function alwaysFalse () {return false;}
-function argSet ($arg = NULL) {var_dump ($arg); return (isset ($arg));}
+function roc_alwaysTrue( ) {return true;}
+function roc_alwaysFalse () {return false;}
+function roc_argSet ($arg = NULL) {var_dump ($arg); return (isset ($arg));}
class CallbackSuite
{
@@ -38,7 +38,7 @@ class RequiredOnCallbackTest extends \PHPUnit_Framework_TestCase
*/
protected function setUp ()
{
- $this -> object = new RequiredOnCallback (array ('callback' => '\gordian\reefknot\input\validate\prop\alwaysTrue'));
+ $this -> object = new RequiredOnCallback (array ('callback' => '\gordian\reefknot\input\validate\prop\roc_alwaysTrue'));
}
/**
@@ -94,7 +94,7 @@ public function testSetConfigInvalidArgsThrowsException ()
{
$exception = NULL;
$cfg = array (
- 'callback' => '\gordian\reefknot\input\validate\prop\argSet',
+ 'callback' => '\gordian\reefknot\input\validate\prop\roc_argSet',
'args' => NULL
);
@@ -115,7 +115,7 @@ public function testSetConfigInvalidArgsThrowsException2 ()
{
$exception = NULL;
$cfg = array (
- 'callback' => '\gordian\reefknot\input\validate\prop\argSet',
+ 'callback' => '\gordian\reefknot\input\validate\prop\roc_argSet',
'args' => 12345
);
@@ -136,7 +136,7 @@ public function testSetConfigValid ()
{
$exception = NULL;
$cfg = array (
- 'callback' => '\gordian\reefknot\input\validate\prop\argSet',
+ 'callback' => '\gordian\reefknot\input\validate\prop\roc_argSet',
'args' => array (1)
);
@@ -257,7 +257,7 @@ public function testIsValidAlwaysTrueFail ()
public function testIsValidAlwaysFalsePass ()
{
- $this -> object -> setConfig (array ('callback' => '\gordian\reefknot\input\validate\prop\alwaysFalse'));
+ $this -> object -> setConfig (array ('callback' => '\gordian\reefknot\input\validate\prop\roc_alwaysFalse'));
$this -> object -> setData ('123');
$this -> assertTrue ($this -> object -> isValid ());
$this -> object -> setData (0);
@@ -274,14 +274,14 @@ public function testIsValidAlwaysFalsePass ()
public function testIsValidArgSetPass ()
{
- $this -> object -> setConfig (array ('callback' => '\gordian\reefknot\input\validate\prop\argSet', 'args' => array (true)));
+ $this -> object -> setConfig (array ('callback' => '\gordian\reefknot\input\validate\prop\roc_argSet', 'args' => array (true)));
$this -> object -> setData ('123');
$this -> assertTrue ($this -> object -> isValid ());
}
public function testIsValidArgSetFail ()
{
- $this -> object -> setConfig (array ('callback' => '\gordian\reefknot\input\validate\prop\argSet', 'args' => array (true)));
+ $this -> object -> setConfig (array ('callback' => '\gordian\reefknot\input\validate\prop\roc_argSet', 'args' => array (true)));
$this -> object -> setData (0);
$this -> assertFalse ($this -> object -> isValid ());
$this -> object -> setData ('');
@@ -296,7 +296,7 @@ public function testIsValidArgSetFail ()
public function testIsValidArgSetPass2 ()
{
- $this -> object -> setConfig (array ('callback' => '\gordian\reefknot\input\validate\prop\argSet', 'args' => array (NULL)));
+ $this -> object -> setConfig (array ('callback' => '\gordian\reefknot\input\validate\prop\roc_argSet', 'args' => array (NULL)));
$this -> object -> setData ('123');
$this -> assertTrue ($this -> object -> isValid ());
$this -> object -> setData (0);
Please sign in to comment.
Something went wrong with that request. Please try again.