Take out implement comment parts and test on local machine
- * @todo Implement testSetBilling_type().
*/
public function testSetBilling_type() {
$ret = $this->object->setBilling_type(1);
*/
public function testSetBilling_type() {
$ret = $this->object->setBilling_type(1);
- * @todo Implement testSetPaid().
*/
public function testSetPaid() {
$ret = $this->object->setPaid(true);
*/
public function testSetPaid() {
$ret = $this->object->setPaid(true);
- * @todo Implement testSetPayment_method().
*/
public function testSetPayment_method() {
$ret = $this->object->setPayment_method(1);
*/
public function testSetPayment_method() {
$ret = $this->object->setPayment_method(1);
- * @todo Implement testSetPayment_method().
*/
public function testSetPayment_method_empty() {
$ret = $this->object->setPayment_method(null);
*/
public function testSetPayment_method_empty() {
$ret = $this->object->setPayment_method(null);
$this->assertInternalType('float', $ret);
}
$this->assertInternalType('float', $ret);
}
- public function testGetBalanceReturnsFloat()
+ public function testGetBalanceReturnsString()
{
$ret = $this->object->getBalance();
{
$ret = $this->object->getBalance();
- $this->assertInternalType('float', $ret);
+ $this->assertInternalType('string', $ret);
- * @todo Implement testSetMember_id().
*/
public function testSetMember_id() {
$ret = $this->object->setMember_id(null);
*/
public function testSetMember_id() {
$ret = $this->object->setMember_id(null);
- * @todo Implement testSetEmailed().
*/
public function testSetEmailed() {
$ret = $this->object->setEmailed(true);
*/
public function testSetEmailed() {
$ret = $this->object->setEmailed(true);
- * @todo Implement testSetPrinted().
*/
public function testSetPrinted() {
$ret = $this->object->setPrinted(true);
*/
public function testSetPrinted() {
$ret = $this->object->setPrinted(true);
* This method is called before a test is executed.
*/
protected function setUp() {
* This method is called before a test is executed.
*/
protected function setUp() {
$_GET = $_POST = array();
$dsn = 'sqlite::memory:';
$driverOptions = array(
$_GET = $_POST = array();
$dsn = 'sqlite::memory:';
$driverOptions = array(
$file = TEST_PATH . 'Toolkit/Members/files/memberdb.sql';
Toolkit_Common::createTables($this->pdo, $file);
$file = TEST_PATH . 'Toolkit/Members/files/memberdb.sql';
Toolkit_Common::createTables($this->pdo, $file);
$this->object = new Toolkit_Members_Billing_Invoices();
$this->object = new Toolkit_Members_Billing_Invoices();
}
protected function getDatabaseTester()
}
protected function getDatabaseTester()
{
return new PHPUnit_Extensions_Database_DataSet_FlatXMLDataSet($file);
}
{
return new PHPUnit_Extensions_Database_DataSet_FlatXMLDataSet($file);
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
- * @todo Implement testCreateInvoices().
*/
public function testCreateInvoices() {
$tester = $this->getDatabaseTester();
*/
public function testCreateInvoices() {
$tester = $this->getDatabaseTester();
- * @todo Implement testGetCurrentInvoiceDate().
*/
public function testGetCurrentInvoiceDate() {
$day = 1;
*/
public function testGetCurrentInvoiceDate() {
$day = 1;
- * @todo Implement testGetNextInvoiceDate().
*/
public function testGetNextInvoiceDate() {
$day = 1;
*/
public function testGetNextInvoiceDate() {
$day = 1;
- * @todo Implement testHasInvoice().
*/
public function testHasInvoice() {
$tester = $this->getDatabaseTester();
*/
public function testHasInvoice() {
$tester = $this->getDatabaseTester();
);
$hasInvoice = ($this->object->hasInvoice($this->pdo, $member));
$this->assertTrue($hasInvoice);
);
$hasInvoice = ($this->object->hasInvoice($this->pdo, $member));
$this->assertTrue($hasInvoice);
'member_id' => 2,
'payment_type' => 1
);
'member_id' => 2,
'payment_type' => 1
);
$mockObject = $this->getMock(
'Toolkit_Members_Billing_Invoices'
);
$mockObject = $this->getMock(
'Toolkit_Members_Billing_Invoices'
);
- * @todo Implement testSetEmail_invoice().
*/
public function testSetEmail_invoice() {
$ret = $this->object->setEmail_invoice(true);
*/
public function testSetEmail_invoice() {
$ret = $this->object->setEmail_invoice(true);
- * @todo Implement testSetUsmail_invoice().
*/
public function testSetUsmail_invoice() {
$ret = $this->object->setUsmail_invoice(true);
*/
public function testSetUsmail_invoice() {
$ret = $this->object->setUsmail_invoice(true);
- * @todo Implement testSetFax_invoice().
*/
public function testSetFax_invoice() {
$ret = $this->object->setFax_invoice(true);
*/
public function testSetFax_invoice() {
$ret = $this->object->setFax_invoice(true);
- * @todo Implement testSetPayment_type().
*/
public function testSetPayment_type() {
$ret = $this->object->setPayment_type(1);
*/
public function testSetPayment_type() {
$ret = $this->object->setPayment_type(1);
- * @todo Implement testSetMember_id().
*/
public function testSetMember_id() {
$ret = $this->object->setMember_id(1);
*/
public function testSetMember_id() {
$ret = $this->object->setMember_id(1);
$file = TEST_PATH . 'Toolkit/Members/files/memberdb.sql';
Toolkit_Common::createTables($this->pdo, $file);
$file = TEST_PATH . 'Toolkit/Members/files/memberdb.sql';
Toolkit_Common::createTables($this->pdo, $file);
$this->object = new Toolkit_Members_Billing_MemberLists($this->pdo);
}
$this->object = new Toolkit_Members_Billing_MemberLists($this->pdo);
}
protected function getDatabaseTester()
{
$connection = new PHPUnit_Extensions_Database_DB_DefaultDatabaseConnection($this->pdo, 'demo');
protected function getDatabaseTester()
{
$connection = new PHPUnit_Extensions_Database_DB_DefaultDatabaseConnection($this->pdo, 'demo');
*/
protected function tearDown()
{
*/
protected function tearDown()
{
- * @todo Implement testGetOpenAccounts().
*/
public function testGetOpenAccounts()
{
*/
public function testGetOpenAccounts()
{
- * @todo Implement testGetAccountsByAge().
*/
public function testGetAccountsByAge()
{
*/
public function testGetAccountsByAge()
{
- * @todo Implement testGetClosedAccounts().
*/
public function testGetClosedAccounts()
{
*/
public function testGetClosedAccounts()
{
- * @todo Implement testGetPrintableInvoices().
*/
public function testGetPrintableInvoices()
{
*/
public function testGetPrintableInvoices()
{
- * @todo Implement testGetEmailableInvoices().
*/
public function testGetEmailableInvoices()
{
*/
public function testGetEmailableInvoices()
{
- * @todo Implement testGetMailableInvoices().
*/
public function testGetMailableInvoices()
{
*/
public function testGetMailableInvoices()
{
- * @todo Implement testGetNeededInvoices().
*/
public function testGetNeededInvoices()
{
*/
public function testGetNeededInvoices()
{
$file = TEST_PATH . 'Toolkit/Members/files/memberdb.sql';
Toolkit_Common::createTables($this->pdo, $file);
$file = TEST_PATH . 'Toolkit/Members/files/memberdb.sql';
Toolkit_Common::createTables($this->pdo, $file);
$this->object = new Toolkit_Members_Billing_Statement();
}
$this->object = new Toolkit_Members_Billing_Statement();
}
- * @todo Implement testGetBalanceDue().
*/
public function testGetBalanceDue() {
$ret = $this->object->getBalanceDue(
*/
public function testGetBalanceDue() {
$ret = $this->object->getBalanceDue(
);
$this->assertEquals('0.00', $ret);
}
);
$this->assertEquals('0.00', $ret);
}
public function testCreateMemberStatements()
{
$tester = $this->getDatabaseTester();
$tester->onSetUp();
public function testCreateMemberStatements()
{
$tester = $this->getDatabaseTester();
$tester->onSetUp();
$_REQUEST['id'] = 1;
$ret = $this->object->createMemberStatements(
$this->pdo,
1
);
$_REQUEST['id'] = 1;
$ret = $this->object->createMemberStatements(
$this->pdo,
1
);
$tester->onTearDown();
}
public function testCreateAllMemberStatements()
{
$tester = $this->getDatabaseTester();
$tester->onSetUp();
$tester->onTearDown();
}
public function testCreateAllMemberStatements()
{
$tester = $this->getDatabaseTester();
$tester->onSetUp();
$_REQUEST['id'] = 1;
$ret = $this->object->createMemberStatements(
$this->pdo,
1,
true
);
$_REQUEST['id'] = 1;
$ret = $this->object->createMemberStatements(
$this->pdo,
1,
true
);
/**
* @expectedException InvalidArgumentException
*/
/**
* @expectedException InvalidArgumentException
*/
/**
* @expected PDOException
*/
/**
* @expected PDOException
*/
*/
$_ENV['GLM_HOST_ID'] = 'STEVE';
*/
$_ENV['GLM_HOST_ID'] = 'STEVE';
-// TODO: check include path
ini_set(
'include_path',
'/var/www/server/glmPEAR'
ini_set(
'include_path',
'/var/www/server/glmPEAR'
<filter>
<blacklist>
<directory>/var/www/server/www.uptravel.com/Toolkit/Members/templates</directory>
<filter>
<blacklist>
<directory>/var/www/server/www.uptravel.com/Toolkit/Members/templates</directory>
+ <directory>/var/www/server/www.uptravel.com/Toolkit/Members/Billing/templates</directory>
<file>/var/www/server/www.uptravel.com/setup.phtml</file>
<file>/var/www/server/www.uptravel.com/setup_functions.phtml</file>
<file>/var/www/server/www.uptravel.com/Toolkit/Common.php</file>
<file>/var/www/server/www.uptravel.com/Toolkit/Table.php</file>
<file>/var/www/server/www.uptravel.com/setup.phtml</file>
<file>/var/www/server/www.uptravel.com/setup_functions.phtml</file>
<file>/var/www/server/www.uptravel.com/Toolkit/Common.php</file>
<file>/var/www/server/www.uptravel.com/Toolkit/Table.php</file>
+ <file>/var/www/server/www.uptravel.com/Toolkit/Logger.php</file>
</blacklist>
<whitelist>
<directory suffix=".php">/var/www/server/www.uptravel.com/Toolkit/Billing</directory>
</blacklist>
<whitelist>
<directory suffix=".php">/var/www/server/www.uptravel.com/Toolkit/Billing</directory>