[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 01/03: Test unitaire avec PHPUNIT
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 01/03: Test unitaire avec PHPUNIT |
Date: |
Mon, 03 Nov 2014 19:35:16 +0000 |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 579f3d47ac8193d380da0af342d05f05bd819c17
Author: Dany De Bontridder <address@hidden>
Date: Mon Nov 3 20:00:47 2014 +0100
Test unitaire avec PHPUNIT
---
unit-test/include/class_acc_balanceTest.php | 74 +++++++++++++++++++++++++++
1 files changed, 74 insertions(+), 0 deletions(-)
diff --git a/unit-test/include/class_acc_balanceTest.php
b/unit-test/include/class_acc_balanceTest.php
new file mode 100644
index 0000000..ddd77dd
--- /dev/null
+++ b/unit-test/include/class_acc_balanceTest.php
@@ -0,0 +1,74 @@
+<?php
+
+/**
+ * Generated by PHPUnit_SkeletonGenerator on 2014-10-31 at 20:33:22.
+ */
+class Acc_BalanceTest extends PHPUnit_Framework_TestCase
+{
+
+ /**
+ * @var Acc_Balance
+ */
+ protected $object;
+
+ /**
+ * Sets up the fixture, for example, opens a network connection.
+ * This method is called before a test is executed.
+ */
+ protected function setUp()
+ {
+ global $g_connection, $g_parameter;
+ $_REQUEST['gDossier']=DOSSIER;
+ $g_connection=new Database(DOSSIER);
+ $g_parameter=new Own($g_connection);
+ $this->object=new Acc_Balance($g_connection);
+ }
+
+ /**
+ * Tears down the fixture, for example, closes a network connection.
+ * This method is called after a test is executed.
+ */
+ protected function tearDown()
+ {
+
+ }
+
+ /**
+ * @covers Acc_Balance::get_row
+ * @todo Implement testGet_row().
+ */
+ public function testGet_row()
+ {
+ $this->object->get_row();
+ // Remove the following lines when you implement this test.
+ $this->markTestIncomplete(
+ 'DATA : cannot be tested'
+ );
+ }
+
+ /**
+ * @covers Acc_Balance::filter_cat
+ * @todo Implement testFilter_cat().
+ */
+ public function testFilter_cat()
+ {
+ $this->object->jrn=1;
+ $this->object->filter_cat(array());
+ $this->assertEquals($this->object->jrn,null);
+ $this->object->filter_cat(array('FIN'));
+ $this->assertEquals($this->object->jrn[0],2);
+ }
+
+ /**
+ * @covers Acc_Balance::test_me
+ * @todo Implement testTest_me().
+ */
+ public function testTest_me()
+ {
+ // Remove the following lines when you implement this test.
+ $this->markTestIncomplete(
+ 'This test has not been implemented yet.'
+ );
+ }
+
+}