コード例 #1
0
ファイル: permission.test.php プロジェクト: styfle/core
 public function startTest($method)
 {
     parent::startTest($method);
     $this->Permission =& new ProxyPermissionHelper();
     $this->Permission->Html = new MockHtmlHelper();
     $this->Permission->Js = new MockJsHelper();
 }
コード例 #2
0
ファイル: group.test.php プロジェクト: styfle/core
 public function startTest($method)
 {
     parent::startTest($method);
     $this->loadFixtures('Group');
     $this->Group =& ClassRegistry::init('Group');
     $this->loadSettings();
 }
コード例 #3
0
ファイル: core.test.php プロジェクト: styfle/core
 public function startTest($method)
 {
     parent::startTest($method);
     $this->loadFixtures('AppSetting', 'Attachment');
     $this->AppSetting =& ClassRegistry::init('AppSetting');
     $this->loadSettings();
 }
コード例 #4
0
ファイル: profile.test.php プロジェクト: styfle/core
 public function startTest($method)
 {
     parent::startTest($method);
     $this->loadFixtures('Profile');
     $this->loadFixtures('Involvement', 'Leader', 'Ministry', 'Campus');
     $this->Profile =& ClassRegistry::init('Profile');
 }
コード例 #5
0
 public function startTest($method)
 {
     parent::startTest($method);
     $this->loadFixtures('User', 'Profile');
     $this->loadSettings();
     $this->AuthorizeDotNet = new MockAuthorizeDotNetComponent();
     $this->Controller = new TestAuthorizeController();
 }
コード例 #6
0
ファイル: confirm.test.php プロジェクト: styfle/core
 public function startTest($method)
 {
     parent::startTest($method);
     $this->loadFixtures('Ministry', 'Involvement', 'MinistriesRev');
     $this->Ministry =& ClassRegistry::init('Ministry');
     $this->Ministry->Behaviors->Confirm->settings['Ministry']['fields'] = array();
     $this->Ministry->RevisionModel->useDbConfig = 'test_suite';
 }
コード例 #7
0
ファイル: image.test.php プロジェクト: styfle/core
 public function startTest($method)
 {
     parent::startTest($method);
     $this->loadFixtures('Attachment');
     $this->Image = ClassRegistry::init('Image');
     $this->Image->Behaviors->detach('Media.Coupler');
     // requires 'file' key, which we don't want to test
 }
コード例 #8
0
 public function startTest($method)
 {
     parent::startTest($method);
     $this->loadFixtures('Leader', 'User', 'Ministry', 'Role');
     $this->Leaders =& new MockMinistryLeadersController();
     $this->Leaders->__construct();
     $this->Leaders->constructClasses();
     $this->testController = $this->Leaders;
 }
コード例 #9
0
ファイル: pages_controller.test.php プロジェクト: styfle/core
 public function startTest($method)
 {
     parent::startTest($method);
     Router::parseExtensions('json');
     $this->Pages =& new TestPagesController();
     $this->Pages->__construct();
     $this->Pages->constructClasses();
     $this->testController = $this->Pages;
 }
コード例 #10
0
 public function startTest($method)
 {
     parent::startTest($method);
     $this->loadFixtures('User', 'Covenant');
     $this->Covenants =& new TestCovenantsController();
     $this->Covenants->__construct();
     $this->Covenants->constructClasses();
     $this->Covenants->setReturnValue('isAuthorized', true);
     $this->testController = $this->Covenants;
 }
コード例 #11
0
 public function startTest($method)
 {
     parent::startTest($method);
     $this->PaymentOptions =& new TestPaymentOptionsController();
     $this->PaymentOptions->__construct();
     $this->PaymentOptions->constructClasses();
     // necessary fixtures
     $this->loadFixtures('PaymentOption');
     $this->testController = $this->PaymentOptions;
 }
コード例 #12
0
ファイル: roles_controller.test.php プロジェクト: styfle/core
 public function startTest($method)
 {
     parent::startTest($method);
     $this->loadFixtures('Role');
     $this->Roles =& new MockRolesController();
     $this->Roles->__construct();
     $this->Roles->constructClasses();
     $this->Roles->setReturnValue('isAuthorized', true);
     $this->testController = $this->Roles;
 }
コード例 #13
0
ファイル: formatting.test.php プロジェクト: styfle/core
 public function startTest($method)
 {
     parent::startTest($method);
     $this->Formatting = new FormattingHelper();
     $this->Formatting->Html = new HtmlHelper();
     $this->Formatting->Text = new TextHelper();
     $this->Formatting->Time = new TimeHelper();
     $this->Formatting->Number = new NumberHelper();
     $this->Formatting->Permission = new MockPermissionHelper();
 }
コード例 #14
0
ファイル: roster.test.php プロジェクト: styfle/core
 public function startTest($method)
 {
     parent::startTest($method);
     $this->loadFixtures('Roster', 'Payment', 'PaymentOption', 'Involvement', 'PaymentType', 'Role', 'RolesRoster', 'RosterStatus');
     $CreditCard = new MockRosterCreditCard();
     $CreditCard->setReturnValue('save', true);
     ClassRegistry::removeObject('CreditCard');
     ClassRegistry::addObject('CreditCard', $CreditCard);
     $this->Roster =& ClassRegistry::init('Roster');
 }
コード例 #15
0
ファイル: app_controller.test.php プロジェクト: styfle/core
 public function startTest($method)
 {
     parent::startTest($method);
     $this->loadFixtures('User', 'Group', 'Notification', 'Alert', 'Household', 'HouseholdMember');
     $this->loadFixtures('Leader', 'Campus', 'Ministry', 'Involvement');
     $this->App =& new ProxyAppController();
     $this->App->__construct();
     $this->App->constructClasses();
     $this->App->activeUser = array('User' => array('id' => 1), 'Group' => array('id' => 1));
 }
コード例 #16
0
 public function startTest($method)
 {
     parent::startTest($method);
     $this->loadFixtures('Invitation', 'InvitationsUser');
     $this->Invitations =& new TestInvitationsController();
     $this->Invitations->__construct();
     $this->Invitations->constructClasses();
     $this->Invitations->setReturnValue('isAuthorized', true);
     $this->testController = $this->Invitations;
 }
コード例 #17
0
 public function startTest($method)
 {
     parent::startTest($method);
     Router::parseExtensions('json');
     $this->loadFixtures('AppSetting', 'User');
     $this->AppSettings =& new TestAppSettingsController();
     $this->AppSettings->__construct();
     $this->AppSettings->constructClasses();
     $this->AppSettings->setReturnValue('isAuthorized', true);
     $this->testController = $this->AppSettings;
 }
コード例 #18
0
 public function startTest($method)
 {
     parent::startTest($method);
     // necessary fixtures
     $this->loadFixtures('Question');
     $this->Questions =& new MockTestQuestionsController();
     $this->Questions->__construct();
     $this->Questions->constructClasses();
     $this->Questions->setReturnValue('isAuthorized', true);
     $this->testController = $this->Questions;
 }
コード例 #19
0
 public function startTest($method)
 {
     parent::startTest($method);
     $this->loadFixtures('Leader', 'User', 'Ministry', 'Role', 'Involvement', 'Date');
     $this->Leaders =& new MockInvolvementLeadersController();
     $this->Leaders->__construct();
     $this->Leaders->constructClasses();
     $this->testController = $this->Leaders;
     $this->Session = new CakeSession();
     $this->Session->destroy();
 }
コード例 #20
0
 public function startTest($method)
 {
     parent::startTest($method);
     $this->loadFixtures('PaginateTest');
     $this->Controller = new PaginateTestsController();
     $this->Controller->__construct();
     $this->Controller->constructClasses();
     $this->Controller->Component->init($this->Controller);
     $this->Controller->FilterPagination = new ProxyFilterPaginationComponent($this->Controller);
     $this->Controller->FilterPagination->Session = $this->Controller->Session;
     $this->testController = $this->Controller;
 }
コード例 #21
0
 public function startTest($method)
 {
     parent::startTest($method);
     $this->Attachments =& new MockProxyUserImagesController();
     $this->Attachments->__construct();
     $this->Attachments->constructClasses();
     $this->Attachments->Notifier->QueueEmail = new MockAttachmentsQueueEmailComponent();
     $this->Attachments->Notifier->QueueEmail->enabled = true;
     $this->Attachments->Notifier->QueueEmail->initialize($this->Attachments);
     $this->Attachments->Notifier->QueueEmail->setReturnValue('_smtp', true);
     $this->Attachments->Notifier->QueueEmail->setReturnValue('_mail', true);
     $this->testController = $this->Attachments;
 }
コード例 #22
0
ファイル: notifier.test.php プロジェクト: styfle/core
 public function startTest($method)
 {
     parent::startTest($method);
     $this->loadFixtures('Notification', 'User', 'Profile', 'SysEmail');
     $this->loadSettings();
     $this->Notification = ClassRegistry::init('Notification');
     $this->Controller = new TestNotifierController();
     $this->Notifier = new MockNotifierNotifierComponent();
     $this->Notifier->setReturnValue('_render', 'A notification');
     $this->Notifier->initialize($this->Controller, array());
     $this->Notifier->QueueEmail = new MockQueueEmailComponent();
     $this->Notifier->QueueEmail->initialize($this->Controller, array());
 }
コード例 #23
0
ファイル: sys_email.test.php プロジェクト: styfle/core
 public function startTest($method)
 {
     parent::startTest($method);
     $this->loadFixtures('Attachment');
     $this->SysEmail =& ClassRegistry::init('SysEmail');
     $this->Document =& ClassRegistry::init('Document');
     // detach behaviors so they get deleted properly (since the files don't really exist)
     $this->Document->Behaviors->detach('Media.Transfer');
     $this->Document->Behaviors->detach('Media.Polymorphic');
     $this->Document->Behaviors->detach('Media.Coupler');
     ClassRegistry::removeObject('Document');
     ClassRegistry::addObject('Document', $this->Document);
 }
コード例 #24
0
 public function startTest($method)
 {
     parent::startTest($method);
     $this->loadFixtures('Alert', 'Group', 'AlertsUser', 'User');
     $this->Alerts =& new TestAlertsController();
     $this->Alerts->__construct();
     $this->Alerts->constructClasses();
     $this->Alerts->Notifier->QueueEmail = new MockAlertsQueueEmailComponent();
     $this->Alerts->Notifier->QueueEmail->enabled = true;
     $this->Alerts->Notifier->QueueEmail->initialize($this->Alerts);
     $this->Alerts->Notifier->QueueEmail->setReturnValue('_smtp', true);
     $this->Alerts->Notifier->QueueEmail->setReturnValue('_mail', true);
     $this->testController = $this->Alerts;
 }
コード例 #25
0
 public function startTest($method)
 {
     parent::startTest($method);
     $this->loadFixtures('Household', 'HouseholdMember', 'User', 'Profile', 'Group');
     $this->Households =& new TestHouseholdsController();
     $this->Households->__construct();
     $this->Households->constructClasses();
     $this->Households->Notifier->QueueEmail = new MockHouseholdsQueueEmailComponent();
     $this->Households->Notifier->QueueEmail->enabled = true;
     $this->Households->Notifier->QueueEmail->initialize($this->Households);
     $this->Households->Notifier->QueueEmail->setReturnValue('_smtp', true);
     $this->Households->Notifier->QueueEmail->setReturnValue('_mail', true);
     $this->Households->setReturnValue('isAuthorized', true);
     $this->testController = $this->Households;
 }
コード例 #26
0
 public function startTest($method)
 {
     parent::startTest($method);
     $this->loadSettings();
     $this->loadFixtures('Campus', 'Ministry', 'Involvement', 'CampusesRev');
     $this->Campuses =& new TestCampusesController();
     $this->Campuses->__construct();
     $this->Campuses->constructClasses();
     $this->Campuses->Notifier->QueueEmail = new MockCampusesQueueEmailComponent();
     $this->Campuses->Notifier->QueueEmail->enabled = true;
     $this->Campuses->Notifier->QueueEmail->initialize($this->Campuses);
     $this->Campuses->Notifier->QueueEmail->setReturnValue('_smtp', true);
     $this->Campuses->Notifier->QueueEmail->setReturnValue('_mail', true);
     $this->testController = $this->Campuses;
 }
コード例 #27
0
 public function startTest($method)
 {
     parent::startTest($method);
     $this->loadFixtures('Notification');
     $this->Notifications =& new TestNotificationsController();
     $this->Notifications->__construct();
     $this->Notifications->constructClasses();
     $this->Notifications->Notifier->QueueEmail = new MockNotificationsQueueEmailComponent();
     $this->Notifications->Notifier->QueueEmail->enabled = true;
     $this->Notifications->Notifier->QueueEmail->initialize($this->Notifications);
     $this->Notifications->Notifier->QueueEmail->setReturnValue('_smtp', true);
     $this->Notifications->Notifier->QueueEmail->setReturnValue('_mail', true);
     $this->Notifications->setReturnValue('isAuthorized', true);
     $this->testController = $this->Notifications;
 }
コード例 #28
0
 public function startTest($method)
 {
     parent::startTest($method);
     $this->loadFixtures('Involvement', 'Roster', 'User', 'InvolvementType', 'Group', 'Ministry');
     $this->loadFixtures('MinistriesRev', 'Leader');
     $this->Involvements =& new MockTestInvolvementsController();
     $this->Involvements->__construct();
     $this->Involvements->constructClasses();
     $this->Involvements->Notifier->QueueEmail = new MockInvolvementsQueueEmailComponent();
     $this->Involvements->Notifier->QueueEmail->enabled = true;
     $this->Involvements->Notifier->QueueEmail->initialize($this->Involvements);
     $this->Involvements->Notifier->QueueEmail->setReturnValue('_smtp', true);
     $this->Involvements->Notifier->QueueEmail->setReturnValue('_mail', true);
     $this->testController = $this->Involvements;
     $this->Involvements->setAuthorized(null, true);
 }
コード例 #29
0
 public function startTest($method)
 {
     parent::startTest($method);
     $this->MergeRequests =& new TestMergeRequestsController();
     $this->MergeRequests->__construct();
     $this->MergeRequests->constructClasses();
     // necessary fixtures
     $this->loadFixtures('User', 'Profile', 'MergeRequest', 'Address');
     $this->MergeRequests->Notifier->QueueEmail = new MockMergeRequestsQueueEmailComponent();
     $this->MergeRequests->Notifier->QueueEmail->enabled = true;
     $this->MergeRequests->Notifier->QueueEmail->initialize($this->MergeRequests);
     $this->MergeRequests->Notifier->QueueEmail->setReturnValue('_smtp', true);
     $this->MergeRequests->Notifier->QueueEmail->setReturnValue('_mail', true);
     $this->MergeRequests->setReturnValue('isAuthorized', true);
     $this->testController = $this->MergeRequests;
 }
コード例 #30
0
ファイル: dates_controller.test.php プロジェクト: styfle/core
 public function startTest($method)
 {
     parent::startTest($method);
     Router::parseExtensions('json');
     $this->loadFixtures('Involvement', 'Date');
     $this->Dates =& new TestDatesController();
     $this->Dates->__construct();
     $this->Dates->constructClasses();
     $this->Dates->Notifier->QueueEmail = new MockDatesQueueEmailComponent();
     $this->Dates->Notifier->QueueEmail->enabled = true;
     $this->Dates->Notifier->QueueEmail->initialize($this->Dates);
     $this->Dates->Notifier->QueueEmail->setReturnValue('_smtp', true);
     $this->Dates->Notifier->QueueEmail->setReturnValue('_mail', true);
     $this->Dates->setReturnValue('isAuthorized', true);
     $this->testController = $this->Dates;
 }