public function setUp() { parent::setUp(); $this->config = m::mock(Config::class); $this->app = m::mock(Application::class); $this->modular = m::mock(Modular::class, [$this->app, $this->config])->makePartial()->shouldAllowMockingProtectedMethods(); }
public function setUp() { parent::setUp(); $company = factory(\App\Entities\Company::class)->create(); $this->company_id = $company->id; $user = factory(\App\Entities\User::class)->create(['company_id' => $this->company_id]); $this->be($user); }
public function setUp() { parent::setUp(); $this->mockCreateValidator = Mockery::mock('MockValidator'); $this->mockUpdateValidator = Mockery::mock('MockValidator'); $this->mockRepository = Mockery::mock('MockRepository'); $this->managementService = new ManagementServiceStub($this->mockRepository, $this->mockCreateValidator, $this->mockUpdateValidator); }
public function setUp() { parent::setUp(); $this->mockGuard = m::mock(Guard::class); $this->mockAccount = m::mock(Account::class); $this->mockAccountManagementService = m::mock(AccountsService::class)->makePartial(); $this->middleware = new AccountMiddleware($this->mockGuard, $this->mockAccountManagementService); }
protected function setUp() { parent::setUp(); $this->replacer = m::mock(Replacer::class)->makePartial()->shouldAllowMockingProtectedMethods(); $this->app = m::mock(Application::class); $this->config = m::mock(Config::class); $this->replacer->setLaravel($this->app); $this->module = m::mock(Module::class); $this->module->shouldReceive('name')->times(4)->andReturn($this->moduleName); $this->config->shouldReceive('modulesNamespace')->once()->andReturn($this->modulesNamespace); }
public function setUp() { parent::setUp(); $this->resourceCriteria = new ResourceCriteria(); }
public function setUp(\Phalcon\DiInterface $di = NULL, \Phalcon\Config $config = NULL) { $this->clearTables(); $this->createUsers(); parent::setUp(Di::getDefault()); }
public function setUp() { parent::setUp(); Session::start(); $this->be(User::find(1)); }
public function setUp() { parent::setUp(); $this->user = m::mock(User::class); $this->consumer = new UserConsumer($this->user); }
/** * Setup method to run before each test */ public function setUp() { parent::setUp(); $this->mockRepository = m::spy(TranslationRepositoryInterface::class); $this->localiser = new Localiser($this->mockRepository); }
protected function setUp() { parent::setUp(); $this->normalizer = new Normalizer(); }
public function setUp() { parent::setUp(); $this->mockRepository = m::mock(SettingRepositoryInterface::class); $this->startupService = new StartupService($this->mockRepository); }