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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
ce35e1c4
Commit
ce35e1c4
authored
13 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Plain Diff
Merge branch 'develop' of
ssh://git@github.com/Dolibarr/dolibarr.git
into develop
parents
88e0123a
32783aaf
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
quickbuild.xml
+90
-0
90 additions, 0 deletions
quickbuild.xml
test/phpunit/SocieteTest.php
+6
-4
6 additions, 4 deletions
test/phpunit/SocieteTest.php
with
96 additions
and
4 deletions
quickbuild.xml
0 → 100644
+
90
−
0
View file @
ce35e1c4
<?xml version="1.0" encoding="UTF-8"?>
<project
name=
"dolibarr"
default=
"hudson"
basedir=
"."
>
<!-- Exclude/ignore paths -->
<property
name=
"ignorepaths"
value=
"${basedir}/htdocs/core/filemanagerdol,${basedir}/htdocs/includes"
/>
<property
name=
"ignoreregexp"
value=
"**/PEAR/*,**/NET/*,**/HTTP/*"
/>
<target
name=
"clean"
>
<!-- Clean up -->
<delete
dir=
"${basedir}/hudson"
/>
<delete
dir=
"${basedir}/generatedJUnitFiles"
/>
<!-- Create build directories -->
<mkdir
dir=
"${basedir}/hudson/logs"
/>
<mkdir
dir=
"${basedir}/hudson/coverage"
/>
</target>
<!-- Run phpmd, phpcpd, phpcs, doxygen and phploc in parallel -->
<target
name=
"parallelTasks"
>
<parallel>
<!-- <antcall target="phpmd"/> -->
<antcall
target=
"phpcpd"
/>
<antcall
target=
"phpcs"
/>
<antcall
target=
"phploc"
/>
</parallel>
</target>
<!-- Generate pmd.xml -->
<!--
<target name="phpmd">
<exec executable="phpmd">
<arg line="htdocs xml codesize,unusedcode
-\-reportfile '${basedir}/hudson/logs/pmd.xml'
-\-ignore=${ignorepaths}
" />
</exec>
</target>
-->
<!-- Generate pmd-cpd.xml -->
<target
name=
"phpcpd"
>
<exec
executable=
"phpcpd"
>
<arg
line=
" --log-pmd '${basedir}/hudson/logs/pmd-cpd.xml'
--exclude '${basedir}/htdocs/core/filemanagerdol'
--exclude '${basedir}/htdocs/includes'
--exclude '**/PEAR/*,**/NET/*,**/HTTP/*'
--min-tokens 70
--min-lines 20
htdocs
"
/>
</exec>
</target>
<!-- Generate phploc.csv -->
<target
name=
"phploc"
>
<exec
executable=
"phploc"
>
<arg
line=
" --log-csv '${basedir}/hudson/logs/phploc.csv'
--exclude '${basedir}/htdocs/core/filemanagerdol'
--exclude '${basedir}/htdocs/includes'
--exclude '**/PEAR/*,**/NET/*,**/HTTP/*'
htdocs
"
/>
</exec>
</target>
<!-- Generate checkstyle.xml -->
<target
name=
"phpcs"
>
<exec
executable=
"phpcs"
dir=
"${basedir}"
output=
"${basedir}/hudson/logs/checkstyle.xml"
>
<arg
line=
" --standard=${basedir}/dev/codesniffer/jenkins_ruleset.xml
--report=checkstyle
--ignore=${ignorepaths},${ignoreregexp}
htdocs
"
/>
</exec>
</target>
<!-- Run unit tests and generate junit.xml and clover.xml -->
<target
name=
"phpunit"
>
<exec
executable=
"phpunit"
dir=
"${basedir}"
failonerror=
"true"
>
<arg
line=
" --configuration ${basedir}/test/phpunit/jenkins_phpunittest.xml
--log-junit ${basedir}/hudson/logs/junit.xml
--coverage-clover ${basedir}/hudson/coverage/clover.xml
--coverage-html ${basedir}/hudson/coverage/
test/phpunit/AllTests.php
"
/>
</exec>
</target>
<target
name=
"hudson"
depends=
"clean,parallelTasks,phpunit"
/>
</project>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
test/phpunit/SocieteTest.php
+
6
−
4
View file @
ce35e1c4
...
...
@@ -266,22 +266,24 @@ class SocieteTest extends PHPUnit_Framework_TestCase
print
__METHOD__
.
" localobject->date_creation="
.
$localobject
->
date_creation
.
"
\n
"
;
$this
->
assertNotEquals
(
$localobject
->
date_creation
,
''
);
$localobject
->
country_code
=
'FR'
;
$localobject
->
idprof1
=
493861496
;
$localobject
->
idprof2
=
49386149600021
;
$result
=
$localobject
->
id_prof_check
(
1
,
$localobject
);
print
__METHOD__
.
" result="
.
$result
.
"
\n
"
;
print
__METHOD__
.
"
true idprof1
result="
.
$result
.
"
\n
"
;
$this
->
assertLessThan
(
$result
,
0
);
$result
=
$localobject
->
id_prof_check
(
2
,
$localobject
);
print
__METHOD__
.
" result="
.
$result
.
"
\n
"
;
print
__METHOD__
.
"
true idprof2
result="
.
$result
.
"
\n
"
;
$this
->
assertLessThan
(
$result
,
0
);
$localobject
->
country_code
=
'FR'
;
$localobject
->
idprof1
=
'id1ko'
;
$localobject
->
idprof2
=
'id2ko'
;
$result
=
$localobject
->
id_prof_check
(
1
,
$localobject
);
print
__METHOD__
.
" result="
.
$result
.
"
\n
"
;
print
__METHOD__
.
"
wrong idprof1
result="
.
$result
.
"
\n
"
;
$this
->
assertGreaterThan
(
$result
,
0
);
$result
=
$localobject
->
id_prof_check
(
2
,
$localobject
);
print
__METHOD__
.
" result="
.
$result
.
"
\n
"
;
print
__METHOD__
.
"
wrong idprof2
result="
.
$result
.
"
\n
"
;
$this
->
assertGreaterThan
(
$result
,
0
);
return
$localobject
->
id
;
...
...
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