mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-29 10:12:41 +01:00
Add a failing test case for new Phortune account initialization
Summary: Ref T12451. Ref T12484. I think D17657 fixed this, but caused the bug in D17690. The fix for that causes this bug again. Put a unit test on it. This test currently fails; I'll correct the bug in the next change. Test Plan: Ran `arc unit`, saw a failure. Reviewers: chad Reviewed By: chad Maniphest Tasks: T12484, T12451 Differential Revision: https://secure.phabricator.com/D17691
This commit is contained in:
parent
e1a8b5d3e9
commit
71d933d496
2 changed files with 28 additions and 0 deletions
|
@ -3428,6 +3428,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorPhortuneContentSource' => 'applications/phortune/contentsource/PhabricatorPhortuneContentSource.php',
|
||||
'PhabricatorPhortuneManagementInvoiceWorkflow' => 'applications/phortune/management/PhabricatorPhortuneManagementInvoiceWorkflow.php',
|
||||
'PhabricatorPhortuneManagementWorkflow' => 'applications/phortune/management/PhabricatorPhortuneManagementWorkflow.php',
|
||||
'PhabricatorPhortuneTestCase' => 'applications/phortune/__tests__/PhabricatorPhortuneTestCase.php',
|
||||
'PhabricatorPhragmentApplication' => 'applications/phragment/application/PhabricatorPhragmentApplication.php',
|
||||
'PhabricatorPhrequentApplication' => 'applications/phrequent/application/PhabricatorPhrequentApplication.php',
|
||||
'PhabricatorPhrictionApplication' => 'applications/phriction/application/PhabricatorPhrictionApplication.php',
|
||||
|
@ -8679,6 +8680,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorPhortuneContentSource' => 'PhabricatorContentSource',
|
||||
'PhabricatorPhortuneManagementInvoiceWorkflow' => 'PhabricatorPhortuneManagementWorkflow',
|
||||
'PhabricatorPhortuneManagementWorkflow' => 'PhabricatorManagementWorkflow',
|
||||
'PhabricatorPhortuneTestCase' => 'PhabricatorTestCase',
|
||||
'PhabricatorPhragmentApplication' => 'PhabricatorApplication',
|
||||
'PhabricatorPhrequentApplication' => 'PhabricatorApplication',
|
||||
'PhabricatorPhrictionApplication' => 'PhabricatorApplication',
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorPhortuneTestCase
|
||||
extends PhabricatorTestCase {
|
||||
|
||||
protected function getPhabricatorTestCaseConfiguration() {
|
||||
return array(
|
||||
self::PHABRICATOR_TESTCONFIG_BUILD_STORAGE_FIXTURES => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function testNewPhortuneAccount() {
|
||||
$user = $this->generateNewTestUser();
|
||||
$content_source = $this->newContentSource();
|
||||
|
||||
$accounts = PhortuneAccountQuery::loadAccountsForUser(
|
||||
$user,
|
||||
$content_source);
|
||||
|
||||
$this->assertEqual(
|
||||
1,
|
||||
count($accounts),
|
||||
pht('Creation of default account for users with no accounts.'));
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue