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:
@@ -3428,6 +3428,7 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorPhortuneContentSource' => 'applications/phortune/contentsource/PhabricatorPhortuneContentSource.php',
|
'PhabricatorPhortuneContentSource' => 'applications/phortune/contentsource/PhabricatorPhortuneContentSource.php',
|
||||||
'PhabricatorPhortuneManagementInvoiceWorkflow' => 'applications/phortune/management/PhabricatorPhortuneManagementInvoiceWorkflow.php',
|
'PhabricatorPhortuneManagementInvoiceWorkflow' => 'applications/phortune/management/PhabricatorPhortuneManagementInvoiceWorkflow.php',
|
||||||
'PhabricatorPhortuneManagementWorkflow' => 'applications/phortune/management/PhabricatorPhortuneManagementWorkflow.php',
|
'PhabricatorPhortuneManagementWorkflow' => 'applications/phortune/management/PhabricatorPhortuneManagementWorkflow.php',
|
||||||
|
'PhabricatorPhortuneTestCase' => 'applications/phortune/__tests__/PhabricatorPhortuneTestCase.php',
|
||||||
'PhabricatorPhragmentApplication' => 'applications/phragment/application/PhabricatorPhragmentApplication.php',
|
'PhabricatorPhragmentApplication' => 'applications/phragment/application/PhabricatorPhragmentApplication.php',
|
||||||
'PhabricatorPhrequentApplication' => 'applications/phrequent/application/PhabricatorPhrequentApplication.php',
|
'PhabricatorPhrequentApplication' => 'applications/phrequent/application/PhabricatorPhrequentApplication.php',
|
||||||
'PhabricatorPhrictionApplication' => 'applications/phriction/application/PhabricatorPhrictionApplication.php',
|
'PhabricatorPhrictionApplication' => 'applications/phriction/application/PhabricatorPhrictionApplication.php',
|
||||||
@@ -8679,6 +8680,7 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorPhortuneContentSource' => 'PhabricatorContentSource',
|
'PhabricatorPhortuneContentSource' => 'PhabricatorContentSource',
|
||||||
'PhabricatorPhortuneManagementInvoiceWorkflow' => 'PhabricatorPhortuneManagementWorkflow',
|
'PhabricatorPhortuneManagementInvoiceWorkflow' => 'PhabricatorPhortuneManagementWorkflow',
|
||||||
'PhabricatorPhortuneManagementWorkflow' => 'PhabricatorManagementWorkflow',
|
'PhabricatorPhortuneManagementWorkflow' => 'PhabricatorManagementWorkflow',
|
||||||
|
'PhabricatorPhortuneTestCase' => 'PhabricatorTestCase',
|
||||||
'PhabricatorPhragmentApplication' => 'PhabricatorApplication',
|
'PhabricatorPhragmentApplication' => 'PhabricatorApplication',
|
||||||
'PhabricatorPhrequentApplication' => 'PhabricatorApplication',
|
'PhabricatorPhrequentApplication' => 'PhabricatorApplication',
|
||||||
'PhabricatorPhrictionApplication' => '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.'));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user