当前位置: 首页>>代码示例>>PHP>>正文


PHP TestBase::setup方法代码示例

本文整理汇总了PHP中TestBase::setup方法的典型用法代码示例。如果您正苦于以下问题:PHP TestBase::setup方法的具体用法?PHP TestBase::setup怎么用?PHP TestBase::setup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TestBase的用法示例。


在下文中一共展示了TestBase::setup方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setup

 public function setup()
 {
     parent::setup();
     $this->fakeAuth = new FakeAuth();
     $this->loginContext = $loginContext = new WebLoginContext(new LoginData(true));
     $this->webAuth = new WebAuthentication($this->fakeAuth, $this->fakeServer);
 }
开发者ID:utn-frm-si,项目名称:booked,代码行数:7,代码来源:WebAuthenticationTests.php

示例2: setup

 public function setup()
 {
     parent::setup();
     $this->page = new FakeSavedReportsPage();
     $this->service = $this->getMock('IReportingService');
     $this->presenter = new SavedReportsPresenter($this->page, $this->fakeUser, $this->service);
 }
开发者ID:utn-frm-si,项目名称:booked,代码行数:7,代码来源:SavedReportsPresenterTests.php

示例3: setup

 public function setup()
 {
     parent::setup();
     $this->attributeRepository = new FakeAttributeRepository();
     $this->controller = new AttributeSaveController($this->attributeRepository);
     $this->session = new FakeWebServiceUserSession(1);
 }
开发者ID:utn-frm-si,项目名称:booked,代码行数:7,代码来源:AttributeSaveControllerTests.php

示例4: setup

 public function setup()
 {
     $this->userRepository = $this->getMock('IUserRepository');
     $this->user = new FakeUserSession();
     $this->repo = new ScheduleAdminScheduleRepository($this->userRepository, $this->user);
     parent::setup();
 }
开发者ID:utn-frm-si,项目名称:booked,代码行数:7,代码来源:ScheduleAdminScheduleRepositoryTests.php

示例5: setup

 public function setup()
 {
     parent::setup();
     $this->page = $this->getMock('IManageResourceGroupsPage');
     $this->resourceRepository = $this->getMock('IResourceRepository');
     $this->presenter = new ManageResourceGroupsPresenter($this->page, $this->fakeUser, $this->resourceRepository);
 }
开发者ID:utn-frm-si,项目名称:booked,代码行数:7,代码来源:ManageResourceGroupsPresenterTests.php

示例6: setup

 public function setup()
 {
     parent::setup();
     $this->scheduleRepository = $this->getMock('IScheduleRepository');
     $this->layout = $this->getMock('IScheduleLayout');
     $this->rule = new SchedulePeriodRule($this->scheduleRepository, $this->fakeUser);
 }
开发者ID:utn-frm-si,项目名称:booked,代码行数:7,代码来源:SchedulePeriodRuleTests.php

示例7: setup

 public function setup()
 {
     parent::setup();
     $this->authentication = $this->getMock('IWebServiceAuthentication');
     $this->server = new FakeRestServer();
     $this->service = new AuthenticationWebService($this->server, $this->authentication);
 }
开发者ID:utn-frm-si,项目名称:booked,代码行数:7,代码来源:AuthenticationWebServiceTests.php

示例8: setup

 public function setup()
 {
     parent::setup();
     $this->server = new FakeRestServer();
     $this->controller = $this->getMock('IUserSaveController');
     $this->service = new UsersWriteWebService($this->server, $this->controller);
 }
开发者ID:utn-frm-si,项目名称:booked,代码行数:7,代码来源:UsersWriteWebServiceTests.php

示例9: setup

 public function setup()
 {
     parent::setup();
     $this->attributeService = $this->getMock('IAttributeService');
     $this->userRepository = $this->getMock('IUserViewRepository');
     $this->validator = new UserRequestValidator($this->attributeService, $this->userRepository);
 }
开发者ID:utn-frm-si,项目名称:booked,代码行数:7,代码来源:UserRequestValidatorTests.php

示例10: setup

 public function setup()
 {
     parent::setup();
     $this->scheduleRepository = $this->getMock('IScheduleRepository');
     $this->schedule = new FakeSchedule();
     $this->schedule->SetTimezone('America/Chicago');
 }
开发者ID:utn-frm-si,项目名称:booked,代码行数:7,代码来源:ResourceCrossDayRuleTests.php

示例11: setup

 public function setup()
 {
     parent::setup();
     $this->attributeService = $this->getMock('IAttributeService');
     $this->server = new FakeRestServer();
     $this->service = new AttributesWebService($this->server, $this->attributeService);
 }
开发者ID:utn-frm-si,项目名称:booked,代码行数:7,代码来源:AttributesWebServiceTests.php

示例12: setup

 public function setup()
 {
     parent::setup();
     $this->page = new FakeAttributePage();
     $this->attributeRepository = $this->getMock('IAttributeRepository');
     $this->presenter = new ManageAttributesPresenter($this->page, $this->attributeRepository);
 }
开发者ID:utn-frm-si,项目名称:booked,代码行数:7,代码来源:ManageAttributesPresenterTests.php

示例13: setup

 public function setup()
 {
     parent::setup();
     $this->scheduleRepository = $this->getMock('IScheduleRepository');
     $this->layout = $this->getMock('IScheduleLayout');
     $this->fakeConfig->SetSectionKey(ConfigSection::RESERVATION, ConfigKeys::RESERVATION_START_TIME_CONSTRAINT, ReservationStartTimeConstraint::FUTURE);
 }
开发者ID:utn-frm-si,项目名称:booked,代码行数:7,代码来源:ReservationStartTimeRuleTests.php

示例14: setup

 public function setup()
 {
     parent::setup();
     $this->page = $this->getMock('ICalendarSubscriptionPage');
     $this->subscriptionService = $this->getMock('ICalendarSubscriptionService');
     $this->validator = new CalendarSubscriptionValidator($this->page, $this->subscriptionService);
 }
开发者ID:utn-frm-si,项目名称:booked,代码行数:7,代码来源:CalendarSubscriptionValidatorTests.php

示例15: setup

 public function setup()
 {
     parent::setup();
     $this->reservationRepository = $this->getMock('IReservationViewRepository');
     $this->accessoryRepository = $this->getMock('IAccessoryRepository');
     $this->rule = new AccessoryAvailabilityRule($this->reservationRepository, $this->accessoryRepository, 'UTC');
 }
开发者ID:utn-frm-si,项目名称:booked,代码行数:7,代码来源:AccessoryAvailabilityRuleTests.php


注:本文中的TestBase::setup方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。