This fixes an issue observed in review of 25673. With that patch included,
`JobProcessMailingTest` would still pass... but only in isolation. When
combined with `ExceptionTest`, it would fail.
I tried disabling the entire substance of `ExceptionTest`, and it still
failed. Say what?
The problem was _the order_ in which `ExceptionTest` does its initialization
(`parent::setUp()` and `$this->useTransaction()`). I suppose that order
determines the effectiveness of the transaction.
Most tests call `setup()` then `useTransaction()`. I looked for
outliers which flipped the order -- and found `EntityTagACLTest`
has the same init and the same spooky interaction.
After fixing the outliers, I'm getting the expected results on
`JobProcessMailingTest`.
* Set up permissions for test.
*/
public function setUp(): void {
- $this->useTransaction(TRUE);
parent::setUp();
+ $this->useTransaction(TRUE);
$individualID = $this->individualCreate();
$daoObj = new CRM_Core_DAO();
$this->callAPISuccess('Attachment', 'create', [
* This method is called before a test is executed.
*/
protected function setUp(): void {
- $this->useTransaction(TRUE);
parent::setUp();
+ $this->useTransaction(TRUE);
}
/**
* @throws \CRM_Core_Exception
*/
public function setUp(): void {
- $this->useTransaction();
parent::setUp();
+ $this->useTransaction();
$contactID = $this->individualCreate();
$this->params = [
'token' => "fancy-token-xxxx",
protected $entity = 'survey';
public function setUp(): void {
+ parent::setUp();
$phoneBankActivityTypeID = $this->callAPISuccessGetValue('Option_value', [
'label' => 'PhoneBank',
'return' => 'value',
'max_number_of_contacts' => 12,
'instructions' => "Call people, ask for money",
];
- parent::setUp();
}
/**