Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
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
Development
CiviCRM Core
Commits
781cfdd0
Commit
781cfdd0
authored
10 years ago
by
totten
Browse files
Options
Downloads
Patches
Plain Diff
CRM-15011 - Add phpunit.xml and bootstrap.php
parent
512835f7
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
phpunit.xml.dist
+27
-0
27 additions, 0 deletions
phpunit.xml.dist
tests/phpunit/CiviTest/bootstrap.php
+33
-0
33 additions, 0 deletions
tests/phpunit/CiviTest/bootstrap.php
with
60 additions
and
0 deletions
phpunit.xml.dist
0 → 100644
+
27
−
0
View file @
781cfdd0
<phpunit backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
beStrictAboutTestsThatDoNotTestAnything="false"
bootstrap="tests/phpunit/CiviTest/bootstrap.php"
>
<testsuites>
<testsuite name="CiviCRM Test Suite">
<directory>./tests/phpunit/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">./CRM</directory>
<directory suffix=".php">./Civi</directory>
<directory suffix=".php">./api</directory>
</whitelist>
</filter>
</phpunit>
This diff is collapsed.
Click to expand it.
tests/phpunit/CiviTest/bootstrap.php
0 → 100644
+
33
−
0
View file @
781cfdd0
<?php
// ADAPTED FROM tools/scripts/phpunit
$GLOBALS
[
'base_dir'
]
=
dirname
(
dirname
(
dirname
(
__DIR__
)));
$tests_dir
=
$GLOBALS
[
'base_dir'
]
.
DIRECTORY_SEPARATOR
.
'tests'
.
DIRECTORY_SEPARATOR
.
'phpunit'
;
$civi_pkgs_dir
=
$GLOBALS
[
'base_dir'
]
.
DIRECTORY_SEPARATOR
.
'packages'
;
ini_set
(
'safe_mode'
,
0
);
ini_set
(
'include_path'
,
"
{
$GLOBALS
[
'base_dir'
]
}
"
.
PATH_SEPARATOR
.
"
$tests_dir
"
.
PATH_SEPARATOR
.
"
$civi_pkgs_dir
"
.
PATH_SEPARATOR
.
ini_get
(
'include_path'
)
);
# Relying on system timezone setting produces a warning,
# doing the following prevents the warning message
if
(
file_exists
(
'/etc/timezone'
)
)
{
$timezone
=
trim
(
file_get_contents
(
'/etc/timezone'
)
);
if
(
ini_set
(
'date.timezone'
,
$timezone
)
===
false
)
{
echo
"ini_set( 'date.timezone', '
$timezone
' ) failed
\n
"
;
}
}
# Crank up the memory
ini_set
(
'memory_limit'
,
'2G'
);
require_once
$GLOBALS
[
'base_dir'
]
.
'/packages/vendor/autoload.php'
;
/*
require $GLOBALS['base_dir'] . DIRECTORY_SEPARATOR .
'packages' . DIRECTORY_SEPARATOR .
'PHPUnit' . DIRECTORY_SEPARATOR .
'Autoload.php';
*/
\ No newline at end of file
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