예제 #1
0
 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
 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
 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
 }
 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
 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;
 }
 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
 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
 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
 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;
 }
 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
 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
 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
 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;
 }