Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include explanation about rebuilding schema in tests #113

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/CRM/CivixBundle/Resources/views/Code/test-api.php.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@ class <?php echo $testClassName ?> extends \PHPUnit_Framework_TestCase implement
* See: https://github.com/civicrm/org.civicrm.testapalooza/blob/master/civi-test.md
*/
public function setUpHeadless() {

// If you muck up your schema somehow you may want to set this to true for one run.
$force_schema_reinstall = FALSE;

return \Civi\Test::headless()
->installMe(__DIR__)
->apply();
->apply($force_schema_reinstall);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,13 @@ class <?php echo $testClass ?> extends \PHPUnit_Framework_TestCase implements He
public function setUpHeadless() {
// Civi\Test has many helpers, like install(), uninstall(), sql(), and sqlFile().
// See: https://github.com/civicrm/org.civicrm.testapalooza/blob/master/civi-test.md

// If you muck up your schema somehow you may want to set this to true for one run.
$force_schema_reinstall = FALSE;

return \Civi\Test::headless()
->installMe(__DIR__)
->apply();
->apply($force_schema_reinstall);
}

public function setUp() {
Expand Down