Merge pull request #285 from victorsl/master
BUG 0000 "PHPUNIT instantiation classDerivationTest.php" SOLVED
This commit is contained in:
@@ -43,7 +43,8 @@ class classDerivationTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
public function testNumberOfMethodsInThisClass()
|
public function testNumberOfMethodsInThisClass()
|
||||||
{
|
{
|
||||||
$methods = get_class_methods('Derivation'); $this->assertTrue( count($methods) == 13);
|
$methods = get_class_methods('Derivation');
|
||||||
|
$this->assertTrue(count($methods) == 13);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -113,12 +114,13 @@ class classDerivationTest extends PHPUnit_Framework_TestCase
|
|||||||
public function testgetUsersFullNameFromArray()
|
public function testgetUsersFullNameFromArray()
|
||||||
{
|
{
|
||||||
$methods = get_class_methods($this->object);
|
$methods = get_class_methods($this->object);
|
||||||
$this->assertTrue( in_array('getUsersFullNameFromArray', $methods ), 'exists method getUsersFullNameFromArray' );
|
$this->assertTrue(in_array('getUsersFullNameFromArray', $methods), 'exists method getUsersFullNameFromArray');
|
||||||
$r = new ReflectionMethod('Derivation', 'getUsersFullNameFromArray');
|
$r = new ReflectionMethod('Derivation', 'getUsersFullNameFromArray');
|
||||||
|
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
$this->assertTrue( $params[0]->getName() == 'aUsers');
|
$this->assertTrue($params[0]->getName() == 'aUsers');
|
||||||
$this->assertTrue( $params[0]->isArray() == false);
|
$this->assertTrue($params[0]->isArray() == false);
|
||||||
$this->assertTrue( $params[0]->isOptional () == false);
|
$this->assertTrue($params[0]->isOptional() == false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -130,10 +132,11 @@ class classDerivationTest extends PHPUnit_Framework_TestCase
|
|||||||
$methods = get_class_methods($this->object);
|
$methods = get_class_methods($this->object);
|
||||||
$this->assertTrue( in_array('getNextAssignedUser', $methods ), 'exists method getNextAssignedUser' );
|
$this->assertTrue( in_array('getNextAssignedUser', $methods ), 'exists method getNextAssignedUser' );
|
||||||
$r = new ReflectionMethod('Derivation', 'getNextAssignedUser');
|
$r = new ReflectionMethod('Derivation', 'getNextAssignedUser');
|
||||||
|
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
$this->assertTrue( $params[0]->getName() == 'tasInfo');
|
$this->assertTrue($params[0]->getName() == 'tasInfo');
|
||||||
$this->assertTrue( $params[0]->isArray() == false);
|
$this->assertTrue($params[0]->isArray() == false);
|
||||||
$this->assertTrue( $params[0]->isOptional () == false);
|
$this->assertTrue($params[0]->isOptional() == false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -145,10 +148,11 @@ class classDerivationTest extends PHPUnit_Framework_TestCase
|
|||||||
$methods = get_class_methods($this->object);
|
$methods = get_class_methods($this->object);
|
||||||
$this->assertTrue( in_array('getDenpendentUser', $methods ), 'exists method getDenpendentUser' );
|
$this->assertTrue( in_array('getDenpendentUser', $methods ), 'exists method getDenpendentUser' );
|
||||||
$r = new ReflectionMethod('Derivation', 'getDenpendentUser');
|
$r = new ReflectionMethod('Derivation', 'getDenpendentUser');
|
||||||
|
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
$this->assertTrue( $params[0]->getName() == 'USR_UID');
|
$this->assertTrue($params[0]->getName() == 'USR_UID');
|
||||||
$this->assertTrue( $params[0]->isArray() == false);
|
$this->assertTrue($params[0]->isArray() == false);
|
||||||
$this->assertTrue( $params[0]->isOptional () == false);
|
$this->assertTrue($params[0]->isOptional() == false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -160,13 +164,14 @@ class classDerivationTest extends PHPUnit_Framework_TestCase
|
|||||||
$methods = get_class_methods($this->object);
|
$methods = get_class_methods($this->object);
|
||||||
$this->assertTrue( in_array('setTasLastAssigned', $methods ), 'exists method setTasLastAssigned' );
|
$this->assertTrue( in_array('setTasLastAssigned', $methods ), 'exists method setTasLastAssigned' );
|
||||||
$r = new ReflectionMethod('Derivation', 'setTasLastAssigned');
|
$r = new ReflectionMethod('Derivation', 'setTasLastAssigned');
|
||||||
|
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
$this->assertTrue( $params[0]->getName() == 'tasUid');
|
$this->assertTrue($params[0]->getName() == 'tasUid');
|
||||||
$this->assertTrue( $params[0]->isArray() == false);
|
$this->assertTrue($params[0]->isArray() == false);
|
||||||
$this->assertTrue( $params[0]->isOptional () == false);
|
$this->assertTrue($params[0]->isOptional() == false);
|
||||||
$this->assertTrue( $params[1]->getName() == 'usrUid');
|
$this->assertTrue($params[1]->getName() == 'usrUid');
|
||||||
$this->assertTrue( $params[1]->isArray() == false);
|
$this->assertTrue($params[1]->isArray() == false);
|
||||||
$this->assertTrue( $params[1]->isOptional () == false);
|
$this->assertTrue($params[1]->isOptional() == false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -178,15 +183,16 @@ class classDerivationTest extends PHPUnit_Framework_TestCase
|
|||||||
$methods = get_class_methods($this->object);
|
$methods = get_class_methods($this->object);
|
||||||
$this->assertTrue( in_array('derivate', $methods ), 'exists method derivate' );
|
$this->assertTrue( in_array('derivate', $methods ), 'exists method derivate' );
|
||||||
$r = new ReflectionMethod('Derivation', 'derivate');
|
$r = new ReflectionMethod('Derivation', 'derivate');
|
||||||
|
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
$this->assertTrue( $params[0]->getName() == 'currentDelegation');
|
$this->assertTrue($params[0]->getName() == 'currentDelegation');
|
||||||
$this->assertTrue( $params[0]->isArray() == false);
|
$this->assertTrue($params[0]->isArray() == false);
|
||||||
$this->assertTrue( $params[0]->isOptional () == true);
|
$this->assertTrue($params[0]->isOptional() == true);
|
||||||
$this->assertTrue( $params[0]->getDefaultValue() == 'Array');
|
$this->assertTrue($params[0]->getDefaultValue() == array());
|
||||||
$this->assertTrue( $params[1]->getName() == 'nextDelegations');
|
$this->assertTrue($params[1]->getName() == 'nextDelegations');
|
||||||
$this->assertTrue( $params[1]->isArray() == false);
|
$this->assertTrue($params[1]->isArray() == false);
|
||||||
$this->assertTrue( $params[1]->isOptional () == true);
|
$this->assertTrue($params[1]->isOptional() == true);
|
||||||
$this->assertTrue( $params[1]->getDefaultValue() == 'Array');
|
$this->assertTrue($params[1]->getDefaultValue() == array());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -261,5 +267,5 @@ class classDerivationTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( $params[0]->isArray() == false);
|
$this->assertTrue( $params[0]->isArray() == false);
|
||||||
$this->assertTrue( $params[0]->isOptional () == false);
|
$this->assertTrue( $params[0]->isOptional () == false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user