Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
d3c0d013
Commit
d3c0d013
authored
15 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
New: First change to add PHPUnit
parent
d30c1784
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
test/FactureTest.php
+1
-1
1 addition, 1 deletion
test/FactureTest.php
test/MyTestSuite.php
+2
-3
2 additions, 3 deletions
test/MyTestSuite.php
test/README
+7
-3
7 additions, 3 deletions
test/README
with
10 additions
and
7 deletions
test/FactureTest.php
+
1
−
1
View file @
d3c0d013
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once
'PHPUnit/Framework.php'
;
require_once
'PHPUnit/Framework.php'
;
require_once
dirname
(
__FILE__
)
.
'/../htdocs/master.inc.php'
;
require_once
dirname
(
__FILE__
)
.
'/../htdocs/master.inc.php'
;
require_once
dirname
(
__FILE__
)
.
'/../htdocs/compta/facture/facture.class.php'
;
require_once
dirname
(
__FILE__
)
.
'/../htdocs/compta/facture/
class/
facture.class.php'
;
/**
/**
* @backupGlobals enabled
* @backupGlobals enabled
...
...
This diff is collapsed.
Click to expand it.
test/
Facture
TestSuite.php
→
test/
My
TestSuite.php
+
2
−
3
View file @
d3c0d013
...
@@ -25,11 +25,10 @@
...
@@ -25,11 +25,10 @@
*/
*/
require_once
'PHPUnit/Framework.php'
;
require_once
'PHPUnit/Framework.php'
;
require_once
dirname
(
__FILE__
)
.
'/../htdocs/master.inc.php'
;
require_once
dirname
(
__FILE__
)
.
'/../htdocs/master.inc.php'
;
require_once
dirname
(
__FILE__
)
.
'/../htdocs/compta/facture/class/facture.class.php'
;
require_once
dirname
(
__FILE__
)
.
'/FactureTest.php'
;
require_once
dirname
(
__FILE__
)
.
'/FactureTest.php'
;
class
Facture
TestSuite
extends
PHPUnit_Framework_TestSuite
class
My
TestSuite
extends
PHPUnit_Framework_TestSuite
{
{
protected
$savconf
;
protected
$savconf
;
protected
$savuser
;
protected
$savuser
;
...
@@ -68,7 +67,7 @@ class FactureTestSuite extends PHPUnit_Framework_TestSuite
...
@@ -68,7 +67,7 @@ class FactureTestSuite extends PHPUnit_Framework_TestSuite
public
static
function
suite
()
public
static
function
suite
()
{
{
return
new
Facture
TestSuite
(
'FactureTest'
);
return
new
My
TestSuite
(
'FactureTest'
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
test/README
+
7
−
3
View file @
d3c0d013
README (English)
README (English)
--------------------------------
--------------------------------
This directory contains unit tests
o
f Dolibarr code.
This directory contains unit tests f
or
Dolibarr code.
To use them, you must:
To use them, you must:
* Install PHPUnit
* Install PHPUnit
* Add an entry in eclipse
as external tool for phpunit programm with:
If using Eclipse, you must also add an entry
as external tool for phpunit programm with:
-Name: PHPUnit
-Name: PHPUnit
-Location: /usr/bin/php
-Location: /usr/bin/php
-Workspace: ${workspace_loc}
-Workspace: ${workspace_loc}
-Arguments: /usr/bin/phpunit ${resource_path}
-Arguments: /usr/bin/phpunit ${resource_path}
* To run a test, select it and click on menu "Run external tools and choose PHPUnit"
\ No newline at end of file
* Run test by
Running > phpunit testfile.php
If using Eclipse, select the test and click on menu "Run external tools and choose PHPUnit".
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment