コード例 #1
0
 /**
  * Set up redirect middleware with mock dependencies.
  */
 public function setUp()
 {
     parent::setUp();
     $this->guard = $this->makeMock(Guard::class);
     $this->redirectIfAuthenticated = new RedirectIfAuthenticated($this->guard);
 }
コード例 #2
0
ファイル: CustomerTest.php プロジェクト: hughgrigg/ching-shop
 /**
  * Set up customer middleware with mock dependencies.
  */
 public function setUp()
 {
     parent::setUp();
     $this->clerk = $this->makeMock(Clerk::class);
     $this->customerMiddleware = new Customer($this->clerk, $this->mockery(Tag::class));
 }
コード例 #3
0
 /**
  * Initialise staff only middleware for each test.
  */
 public function setUp()
 {
     parent::setUp();
     $this->staffOnly = new StaffOnly();
     $this->request = $this->mockery(Request::class);
 }
コード例 #4
0
 /**
  * Create ForceSecure middleware with dependencies for each test.
  */
 public function setUp()
 {
     parent::setUp();
     $this->redirector = $this->makeMock(Redirector::class);
     $this->forceSecure = new ForceSecure($this->redirector);
 }
コード例 #5
0
 /**
  * Create EbSslTrust for each test.
  */
 public function setUp()
 {
     parent::setUp();
     $this->ebSslTrust = new EbSslTrust();
 }
コード例 #6
0
 /**
  * Initialise Authenticate middleware for each test.
  */
 public function setUp()
 {
     parent::setUp();
     $this->guard = $this->mockery(Guard::class);
     $this->authenticate = new Authenticate($this->guard);
 }