/** * @depends testLoginFunction */ public function testScopePassedToLoginFunction() { $scope = new \Niysu\Scope(['test' => 5]); $service = new AuthService($scope); $service->setLoginCallback(function ($login, $test, $password) { $this->assertEquals(5, $test); $this->assertEquals('login', $login); $this->assertEquals('pass', $password); return 12; }); $this->assertEquals(12, $service->login(['login' => 'login', 'password' => 'pass'])); }