Пример #1
0
 /**
  * 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);
 }
Пример #3
0
 /**
  * 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);
 }
Пример #4
0
 /**
  * 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);
 }
Пример #5
0
 /**
  * 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);
 }
Пример #6
0
 /**
  * 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);
 }
Пример #7
0
 /**
  * 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);
 }
Пример #8
0
 /**
  * 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);
 }
Пример #9
0
 /**
  * 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);
 }
Пример #10
0
 /**
  * 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);
 }
Пример #11
0
 /**
  * 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);
 }
Пример #12
0
 /**
  * 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);
 }
Пример #13
0
 /**
  * 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);
 }
Пример #15
0
 /**
  * Set up testing container for each test.
  */
 public function setUp()
 {
     parent::setUp();
     $this->container = new Container();
     Container::setInstance($this->container);
 }
Пример #16
0
 /**
  * Set up image for each test.
  */
 public function setUp()
 {
     parent::setUp();
     $this->image = new Image();
 }
Пример #17
0
 /**
  * Set up price for each test.
  */
 public function setUp()
 {
     parent::setUp();
     $this->price = new Price();
 }
Пример #18
0
 /**
  * Initialise Authenticate middleware for each test.
  */
 public function setUp()
 {
     parent::setUp();
     $this->request = $this->mockery(Request::class);
 }
Пример #19
0
 /**
  * Unset imagick mock after each test.
  */
 public function tearDown()
 {
     parent::tearDown();
     unset($this->imagick);
 }
Пример #20
0
 /**
  * Set up tag for each test.
  */
 public function setUp()
 {
     parent::setUp();
     $this->tag = new Tag();
 }