Merge remote branch 'upstream/master'
This commit is contained in:
@@ -26,7 +26,7 @@ class classbzip_fileTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$this->object = new bzip_file();
|
||||
$this->object = new bzip_file('bzipfile.bzip');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -38,12 +38,13 @@ class classbzip_fileTest extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* This is the default method to test, if the class still having
|
||||
* This is the default method to test, if the class still having
|
||||
* the same number of methods.
|
||||
*/
|
||||
public function testNumberOfMethodsInThisClass()
|
||||
{
|
||||
$methods = get_class_methods('bzip_file'); $this->assertTrue( count($methods) == 18);
|
||||
$methods = get_class_methods('bzip_file');
|
||||
$this->assertTrue(count($methods) == 18);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -53,13 +54,13 @@ class classbzip_fileTest extends PHPUnit_Framework_TestCase
|
||||
public function testbzip_file()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('bzip_file', $methods ), 'exists method bzip_file' );
|
||||
$this->assertTrue(in_array('bzip_file', $methods), 'exists method bzip_file');
|
||||
$r = new ReflectionMethod('bzip_file', 'bzip_file');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'name');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
$this->assertTrue($params[0]->getName() == 'name');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers bzip_file::create_bzip
|
||||
@@ -68,10 +69,10 @@ class classbzip_fileTest extends PHPUnit_Framework_TestCase
|
||||
public function testcreate_bzip()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('create_bzip', $methods ), 'exists method create_bzip' );
|
||||
$this->assertTrue(in_array('create_bzip', $methods), 'exists method create_bzip');
|
||||
$r = new ReflectionMethod('bzip_file', 'create_bzip');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers bzip_file::open_archive
|
||||
@@ -80,9 +81,9 @@ class classbzip_fileTest extends PHPUnit_Framework_TestCase
|
||||
public function testopen_archive()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('open_archive', $methods ), 'exists method open_archive' );
|
||||
$this->assertTrue(in_array('open_archive', $methods), 'exists method open_archive');
|
||||
$r = new ReflectionMethod('bzip_file', 'open_archive');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -38,12 +38,13 @@ class classspoolRunTest extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* This is the default method to test, if the class still having
|
||||
* This is the default method to test, if the class still having
|
||||
* the same number of methods.
|
||||
*/
|
||||
public function testNumberOfMethodsInThisClass()
|
||||
{
|
||||
$methods = get_class_methods('spoolRun'); $this->assertTrue( count($methods) == 9);
|
||||
$methods = get_class_methods('spoolRun');
|
||||
$this->assertTrue( count($methods) == 9);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -53,10 +54,10 @@ class classspoolRunTest extends PHPUnit_Framework_TestCase
|
||||
public function test__construct()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' );
|
||||
$this->assertTrue( in_array('__construct', $methods), 'exists method __construct');
|
||||
$r = new ReflectionMethod('spoolRun', '__construct');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers spoolRun::getSpoolFilesList
|
||||
@@ -65,10 +66,10 @@ class classspoolRunTest extends PHPUnit_Framework_TestCase
|
||||
public function testgetSpoolFilesList()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getSpoolFilesList', $methods ), 'exists method getSpoolFilesList' );
|
||||
$this->assertTrue( in_array('getSpoolFilesList', $methods), 'exists method getSpoolFilesList');
|
||||
$r = new ReflectionMethod('spoolRun', 'getSpoolFilesList');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers spoolRun::create
|
||||
@@ -77,13 +78,13 @@ class classspoolRunTest extends PHPUnit_Framework_TestCase
|
||||
public function testcreate()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('create', $methods ), 'exists method create' );
|
||||
$this->assertTrue( in_array('create', $methods), 'exists method create');
|
||||
$r = new ReflectionMethod('spoolRun', 'create');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'aData');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
$this->assertTrue( $params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers spoolRun::setConfig
|
||||
@@ -92,13 +93,13 @@ class classspoolRunTest extends PHPUnit_Framework_TestCase
|
||||
public function testsetConfig()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setConfig', $methods ), 'exists method setConfig' );
|
||||
$this->assertTrue( in_array('setConfig', $methods), 'exists method setConfig');
|
||||
$r = new ReflectionMethod('spoolRun', 'setConfig');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'aConfig');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
$this->assertTrue( $params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers spoolRun::setData
|
||||
@@ -107,45 +108,45 @@ class classspoolRunTest extends PHPUnit_Framework_TestCase
|
||||
public function testsetData()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setData', $methods ), 'exists method setData' );
|
||||
$this->assertTrue( in_array('setData', $methods), 'exists method setData');
|
||||
$r = new ReflectionMethod('spoolRun', 'setData');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sAppMsgUid');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[0]->isOptional() == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'sSubject');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->isOptional() == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'sFrom');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->isOptional() == false);
|
||||
$this->assertTrue( $params[3]->getName() == 'sTo');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == false);
|
||||
$this->assertTrue( $params[3]->isOptional() == false);
|
||||
$this->assertTrue( $params[4]->getName() == 'sBody');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == false);
|
||||
$this->assertTrue( $params[4]->isOptional() == false);
|
||||
$this->assertTrue( $params[5]->getName() == 'sDate');
|
||||
$this->assertTrue( $params[5]->isArray() == false);
|
||||
$this->assertTrue( $params[5]->isOptional () == true);
|
||||
$this->assertTrue( $params[5]->isOptional() == true);
|
||||
$this->assertTrue( $params[5]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[6]->getName() == 'sCC');
|
||||
$this->assertTrue( $params[6]->isArray() == false);
|
||||
$this->assertTrue( $params[6]->isOptional () == true);
|
||||
$this->assertTrue( $params[6]->isOptional() == true);
|
||||
$this->assertTrue( $params[6]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[7]->getName() == 'sBCC');
|
||||
$this->assertTrue( $params[7]->isArray() == false);
|
||||
$this->assertTrue( $params[7]->isOptional () == true);
|
||||
$this->assertTrue( $params[7]->isOptional() == true);
|
||||
$this->assertTrue( $params[7]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[8]->getName() == 'sTemplate');
|
||||
$this->assertTrue( $params[8]->isArray() == false);
|
||||
$this->assertTrue( $params[8]->isOptional () == true);
|
||||
$this->assertTrue( $params[8]->isOptional() == true);
|
||||
$this->assertTrue( $params[8]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[9]->getName() == 'aAttachment');
|
||||
$this->assertTrue( $params[9]->isArray() == false);
|
||||
$this->assertTrue( $params[9]->isOptional () == true);
|
||||
$this->assertTrue( $params[9]->getDefaultValue() == 'Array');
|
||||
}
|
||||
$this->assertTrue( $params[9]->isOptional() == true);
|
||||
$this->assertTrue( $params[9]->getDefaultValue() == array());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers spoolRun::sendMail
|
||||
@@ -154,10 +155,10 @@ class classspoolRunTest extends PHPUnit_Framework_TestCase
|
||||
public function testsendMail()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('sendMail', $methods ), 'exists method sendMail' );
|
||||
$this->assertTrue( in_array('sendMail', $methods), 'exists method sendMail');
|
||||
$r = new ReflectionMethod('spoolRun', 'sendMail');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers spoolRun::resendEmails
|
||||
@@ -166,10 +167,10 @@ class classspoolRunTest extends PHPUnit_Framework_TestCase
|
||||
public function testresendEmails()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('resendEmails', $methods ), 'exists method resendEmails' );
|
||||
$this->assertTrue( in_array('resendEmails', $methods), 'exists method resendEmails');
|
||||
$r = new ReflectionMethod('spoolRun', 'resendEmails');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers spoolRun::getWarnings
|
||||
@@ -178,10 +179,10 @@ class classspoolRunTest extends PHPUnit_Framework_TestCase
|
||||
public function testgetWarnings()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getWarnings', $methods ), 'exists method getWarnings' );
|
||||
$this->assertTrue( in_array('getWarnings', $methods), 'exists method getWarnings');
|
||||
$r = new ReflectionMethod('spoolRun', 'getWarnings');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers spoolRun::db_insert
|
||||
@@ -190,12 +191,12 @@ class classspoolRunTest extends PHPUnit_Framework_TestCase
|
||||
public function testdb_insert()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('db_insert', $methods ), 'exists method db_insert' );
|
||||
$this->assertTrue( in_array('db_insert', $methods), 'exists method db_insert');
|
||||
$r = new ReflectionMethod('spoolRun', 'db_insert');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'db_spool');
|
||||
$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