Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 15
0
 /**
  * Set up testing container for each test.
  */
 public function setUp()
 {
     parent::setUp();
     $this->container = new Container();
     Container::setInstance($this->container);
 }
Exemplo n.º 16
0
 /**
  * Set up image for each test.
  */
 public function setUp()
 {
     parent::setUp();
     $this->image = new Image();
 }
Exemplo n.º 17
0
 /**
  * Set up price for each test.
  */
 public function setUp()
 {
     parent::setUp();
     $this->price = new Price();
 }
Exemplo n.º 18
0
 /**
  * Initialise Authenticate middleware for each test.
  */
 public function setUp()
 {
     parent::setUp();
     $this->request = $this->mockery(Request::class);
 }
Exemplo n.º 19
0
 /**
  * Unset imagick mock after each test.
  */
 public function tearDown()
 {
     parent::tearDown();
     unset($this->imagick);
 }
Exemplo n.º 20
0
 /**
  * Set up tag for each test.
  */
 public function setUp()
 {
     parent::setUp();
     $this->tag = new Tag();
 }