Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dataprocessor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Extensions
dataprocessor
Commits
6b375c7f
Commit
6b375c7f
authored
5 years ago
by
sarvesh21
Committed by
sarvesh21
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
removing files
parent
be1f3a34
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!12
Testing
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/phpunit/CRM/Myextension/2MyHeadlessTest.php
+0
-54
0 additions, 54 deletions
tests/phpunit/CRM/Myextension/2MyHeadlessTest.php
with
0 additions
and
54 deletions
tests/phpunit/CRM/Myextension/2MyHeadlessTest.php
deleted
100644 → 0
+
0
−
54
View file @
be1f3a34
<?php
use
CRM_Dataprocessor_ExtensionUtil
as
E
;
use
Civi\Test\HeadlessInterface
;
use
Civi\Test\HookInterface
;
use
Civi\Test\TransactionalInterface
;
/**
* FIXME - Add test description.
*
* Tips:
* - With HookInterface, you may implement CiviCRM hooks directly in the test class.
* Simply create corresponding functions (e.g. "hook_civicrm_post(...)" or similar).
* - With TransactionalInterface, any data changes made by setUp() or test****() functions will
* rollback automatically -- as long as you don't manipulate schema or truncate tables.
* If this test needs to manipulate schema or truncate tables, then either:
* a. Do all that using setupHeadless() and Civi\Test.
* b. Disable TransactionalInterface, and handle all setup/teardown yourself.
*
* @group headless
*/
class
CRM_Myextension_2MyHeadlessTest
extends
\PHPUnit_Framework_TestCase
implements
HeadlessInterface
,
HookInterface
,
TransactionalInterface
{
public
function
setUpHeadless
()
{
// Civi\Test has many helpers, like install(), uninstall(), sql(), and sqlFile().
// See: https://docs.civicrm.org/dev/en/latest/testing/phpunit/#civitest
return
\Civi\Test
::
headless
()
->
installMe
(
__DIR__
)
->
apply
();
}
public
function
setUp
()
{
parent
::
setUp
();
}
public
function
tearDown
()
{
parent
::
tearDown
();
}
/**
* Example: Test that a version is returned.
*/
public
function
testWellFormedVersion
()
{
$this
->
assertRegExp
(
'/^([0-9\.]|alpha|beta)*$/'
,
\CRM_Utils_System
::
version
());
}
/**
* Example: Test that we're using a fake CMS.
*/
public
function
testWellFormedUF
()
{
$this
->
assertEquals
(
'UnitTests'
,
CIVICRM_UF
);
}
}
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