/** * Set up tag presenter with mock tag. */ public function setUp() { parent::setUp(); $this->tag = $this->mockery(Tag::class); $this->setMockModel($this->tag); $this->tagPresenter = new TagPresenter($this->tag); }
/** * Initialise product repository with mock product resource model. */ public function setUp() { parent::setUp(); $this->productResource = $this->mockery(Product::class); $this->setMockModel($this->productResource); $this->productRepository = new ProductRepository($this->productResource); }
/** * Initialise product presenter with mock product. */ public function setUp() { parent::setUp(); $this->product = $this->mockery(Product::class); $this->setMockModel($this->product); $this->productPresenter = new ProductPresenter($this->product); }
/** * Set up tag repository with mock tag model. */ public function setUp() { parent::setUp(); $this->tagModel = $this->mockery(Tag::class); $this->setMockModel($this->tagModel); $this->tagRepository = new TagRepository($this->tagModel); }
/** * Initialise location composer with mock dependencies. */ public function setUp() { parent::setUp(); $this->router = $this->mockery(Router::class); $this->urlGenerator = $this->mockery(UrlGenerator::class); $this->locationComposer = new StaffLocationComposer($this->router, $this->urlGenerator); }
/** * Set up customer location composer with mock dependencies. */ public function setUp() { parent::setUp(); $this->router = $this->makeMock(Router::class); $this->urlGenerator = $this->makeMock(UrlGenerator::class); $this->locationComposer = new LocationComposer($this->router, $this->urlGenerator); $this->view = $this->makeMock(View::class); }
/** * Initialise reply composer with mock session store. */ public function setUp() { parent::setUp(); $this->sessionStore = $this->mockery(SessionStore::class); $this->errors = $this->mockery(MessageBag::class); $this->sessionStore->shouldReceive('get')->with('errors', Mockery::type(MessageBag::class))->andReturn($this->errors); $this->replyComposer = new ReplyComposer($this->sessionStore); }
/** * Set up MakeUser action with mock validator. */ public function setUp() { parent::setUp(); $this->hasher = $this->mockery(Hasher::class); $this->validation = $this->makeMock(ValidationInterface::class); $this->role = $this->makeMock(Role::class); $this->makeUser = new MakeUser($this->validation, $this->hasher, $this->role); }
/** * Initialise image repository with mock dependencies. */ public function setUp() { parent::setUp(); $this->imageResource = $this->mockery(Image::class); $this->setMockModel($this->imageResource); $this->dispatcher = $this->makeMock(Dispatcher::class); $this->imageRepository = new ImageRepository($this->imageResource, $this->dispatcher); }
/** * Initialise handler for each test. */ public function setUp() { parent::setUp(); $this->logger = $this->makeMock(LoggerInterface::class); $this->container = new \Illuminate\Container\Container(); $this->container[LoggerInterface::class] = $this->logger; $this->handler = new Handler($this->container); }
/** * Unset view factory after each test. */ public function tearDown() { parent::tearDown(); unset($this->viewFactory); unset($this->responseFactory); unset($this->productRepository); unset($this->flashNotifier); unset($this->webUi); }
/** * Set up new image listener with mock dependencies. */ public function setUp() { parent::setUp(); $this->imagePreProcessor = $this->makeMock(ImagePreProcessor::class); $this->config = $this->makeMock(Repository::class); $this->publicFilesystem = $this->makeMock(FilesystemAdapter::class); $this->filesystem = $this->makeMock(FilesystemInterface::class); $this->publicFilesystem->expects($this->any())->method('getDriver')->willReturn($this->filesystem); $this->newImageListener = new NewImageListener($this->imagePreProcessor, $this->publicFilesystem, $this->config); $this->image = $this->makeMock(Image::class); $this->event = new NewImageEvent($this->image); }
/** * Initialise product for each test. */ public function setUp() { parent::setUp(); $this->product = new Product(); }
/** * Set up illuminate validation with mock dependencies. */ public function setUp() { parent::setUp(); $this->validationFactory = $this->makeMock(Factory::class); $this->illuminateValidation = new IlluminateValidation($this->validationFactory); }
/** * Set up testing container for each test. */ public function setUp() { parent::setUp(); $this->container = new Container(); Container::setInstance($this->container); }
/** * Set up image for each test. */ public function setUp() { parent::setUp(); $this->image = new Image(); }
/** * Set up price for each test. */ public function setUp() { parent::setUp(); $this->price = new Price(); }
/** * Initialise Authenticate middleware for each test. */ public function setUp() { parent::setUp(); $this->request = $this->mockery(Request::class); }
/** * Unset imagick mock after each test. */ public function tearDown() { parent::tearDown(); unset($this->imagick); }
/** * Set up tag for each test. */ public function setUp() { parent::setUp(); $this->tag = new Tag(); }