mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 16:44:28 +00:00
HTTP digest authentication
The digest http authentication does not allow to use a password storing systems, that do not successively allow to retrieve it, even if hashed
This commit is contained in:
@@ -60,11 +60,7 @@ $autoload['packages'] = array();
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
//$autoload['libraries'] = array();
|
//$autoload['libraries'] = array();
|
||||||
$autoload['libraries'] = array('session', 'Fhcauth');
|
$autoload['libraries'] = array('Session', 'FHC_Auth');
|
||||||
|
|
||||||
//$autoload['libraries'] = array();
|
|
||||||
$autoload['libraries'] = array('session');
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
| -------------------------------------------------------------------
|
| -------------------------------------------------------------------
|
||||||
|
|||||||
@@ -139,14 +139,16 @@ $config['auth_source'] = 'library';
|
|||||||
| In other cases override the function _perform_library_auth in your controller
|
| In other cases override the function _perform_library_auth in your controller
|
||||||
|
|
|
|
||||||
| For digest authentication the library function should return already a stored
|
| For digest authentication the library function should return already a stored
|
||||||
| md5(username:restrealm:password) for that username
|
| password for that username, even if it is hashed
|
||||||
|
|
|
||||||
| e.g: md5('admin:REST API:1234') = '1e957ebc35631ab22d5bd6526bd14ea2'
|
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
$config['auth_library_class'] = 'fhcauth';
|
$config['auth_library_class'] = 'FHC_Auth';
|
||||||
|
|
||||||
|
// rest_auth is basic
|
||||||
//$config['auth_library_function'] = 'auth';
|
//$config['auth_library_function'] = 'auth';
|
||||||
$config['auth_library_function'] = 'auth_digest';
|
|
||||||
|
// rest_auth is digest
|
||||||
|
$config['auth_library_function'] = 'digestAuthentication';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class APIAuth extends APIv1_Controller
|
|||||||
// Load helper
|
// Load helper
|
||||||
//$this->load->helper('fhcauth');
|
//$this->load->helper('fhcauth');
|
||||||
$this->load->library('session');
|
$this->load->library('session');
|
||||||
$this->load->library('Fhcauth');
|
$this->load->library('FHC_Auth');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -62,7 +62,7 @@ class APIAuth extends APIv1_Controller
|
|||||||
$username = urldecode($this->get('username'));
|
$username = urldecode($this->get('username'));
|
||||||
$password = urldecode($this->get('password'));
|
$password = urldecode($this->get('password'));
|
||||||
|
|
||||||
$account = $this->fhcauth->auth($username, $password);
|
$account = $this->fhc_auth->auth($username, $password);
|
||||||
|
|
||||||
// perform login checks
|
// perform login checks
|
||||||
if (!$account)
|
if (!$account)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
defined('BASEPATH') || exit('No direct script access allowed');
|
defined('BASEPATH') || exit('No direct script access allowed');
|
||||||
|
|
||||||
class Person extends REST_Controller
|
class Person extends APIv1_Controller
|
||||||
{
|
{
|
||||||
|
|
||||||
//public $session;
|
//public $session;
|
||||||
@@ -24,181 +24,184 @@ class Person extends REST_Controller
|
|||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|
||||||
$this->load->model('person/person_model');
|
$this->load->model('person/person_model');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function person_get()
|
public function person_get()
|
||||||
{
|
{
|
||||||
//if (!$this->session_model->validate($this->get('session_id'), $this->get('device_id')))
|
//if (!$this->session_model->validate($this->get('session_id'), $this->get('device_id')))
|
||||||
// $this->response(array(['success' => false, 'message' => 'access denied']), REST_Controller::HTTP_UNAUTHORIZED);
|
// $this->response(array(['success' => false, 'message' => 'access denied']), REST_Controller::HTTP_UNAUTHORIZED);
|
||||||
|
|
||||||
$code = $this->get('code');
|
$code = $this->get('code');
|
||||||
$email = $this->get('email');
|
$email = $this->get('email');
|
||||||
$person_id = $this->get('person_id');
|
$person_id = $this->get('person_id');
|
||||||
|
|
||||||
if ((!is_null($code)) && (!is_null($email)))
|
if ((!is_null($code)) && (!is_null($email)))
|
||||||
{
|
{
|
||||||
$result = $this->person_model->getPersonByCodeAndEmail($code, $email);
|
$result = $this->person_model->getPersonByCodeAndEmail($code, $email);
|
||||||
}
|
}
|
||||||
elseif (!is_null($person_id))
|
elseif (! is_null($code))
|
||||||
{
|
{
|
||||||
$result = $this->person_model->getPerson($person_id);
|
$result = $this->person_model->getPersonByCode($code, $email);
|
||||||
}
|
}
|
||||||
else
|
elseif (!is_null($person_id))
|
||||||
{
|
{
|
||||||
$result = $this->person_model->getPerson();
|
$result = $this->person_model->getPerson($person_id);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$result = $this->person_model->getPerson();
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($result))
|
if (empty($result))
|
||||||
{
|
{
|
||||||
$payload = [
|
$payload = [
|
||||||
'success' => false,
|
'success' => false,
|
||||||
'message' => 'Person not found'
|
'message' => 'Person not found'
|
||||||
];
|
];
|
||||||
$httpstatus = REST_Controller::HTTP_OK;
|
$httpstatus = REST_Controller::HTTP_OK;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// return all available persons
|
// return all available persons
|
||||||
$payload = [
|
$payload = [
|
||||||
'success' => true,
|
'success' => true,
|
||||||
'message' => 'Persons found'
|
'message' => 'Persons found'
|
||||||
];
|
];
|
||||||
$payload['data'] = $result;
|
$payload['data'] = $result;
|
||||||
$httpstatus = REST_Controller::HTTP_OK;
|
$httpstatus = REST_Controller::HTTP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the response and exit
|
// Set the response and exit
|
||||||
$this->response($payload, $httpstatus);
|
$this->response($payload, $httpstatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function personFromCode_post()
|
public function personFromCode_post()
|
||||||
{
|
{
|
||||||
$code = $this->post('code');
|
$code = $this->post('code');
|
||||||
$email = $this->post('email');
|
$email = $this->post('email');
|
||||||
$person_id = $this->post('person_id');
|
$person_id = $this->post('person_id');
|
||||||
|
|
||||||
if ((!is_null($code)) && (!is_null($email)))
|
if ((!is_null($code)) && (!is_null($email)))
|
||||||
{
|
{
|
||||||
$result = $this->person_model->getPersonByCodeAndEmail($code, $email);
|
$result = $this->person_model->getPersonByCodeAndEmail($code, $email);
|
||||||
}
|
}
|
||||||
elseif (!is_null($person_id))
|
elseif (!is_null($person_id))
|
||||||
{
|
{
|
||||||
$result = $this->person_model->getPerson($person_id);
|
$result = $this->person_model->getPerson($person_id);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$result = $this->person_model->getPerson();
|
$result = $this->person_model->getPerson();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($result))
|
if (empty($result))
|
||||||
{
|
{
|
||||||
$payload = [
|
$payload = [
|
||||||
'success' => false,
|
'success' => false,
|
||||||
'message' => 'Person not found'
|
'message' => 'Person not found'
|
||||||
];
|
];
|
||||||
$httpstatus = REST_Controller::HTTP_OK;
|
$httpstatus = REST_Controller::HTTP_OK;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// return all available persons
|
// return all available persons
|
||||||
$payload = [
|
$payload = [
|
||||||
'success' => true,
|
'success' => true,
|
||||||
'message' => 'Persons found'
|
'message' => 'Persons found'
|
||||||
];
|
];
|
||||||
$payload['data'] = $result;
|
$payload['data'] = $result;
|
||||||
$httpstatus = REST_Controller::HTTP_OK;
|
$httpstatus = REST_Controller::HTTP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the response and exit
|
// Set the response and exit
|
||||||
$this->response($payload, $httpstatus);
|
$this->response($payload, $httpstatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function person_post()
|
public function person_post()
|
||||||
{
|
{
|
||||||
$result = $this->person_model->savePerson($this->post());
|
$result = $this->person_model->savePerson($this->post());
|
||||||
if($result != FALSE)
|
if($result != FALSE)
|
||||||
{
|
{
|
||||||
$httpstatus = REST_Controller::HTTP_OK;
|
$httpstatus = REST_Controller::HTTP_OK;
|
||||||
$payload = [
|
$payload = [
|
||||||
'success' => true,
|
'success' => true,
|
||||||
'message' => 'Person saved.'
|
'message' => 'Person saved.'
|
||||||
];
|
];
|
||||||
$payload['data'] = $result;
|
$payload['data'] = $result;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$payload = [
|
$payload = [
|
||||||
'success' => false,
|
'success' => false,
|
||||||
'message' => 'Could not save person.'
|
'message' => 'Could not save person.'
|
||||||
];
|
];
|
||||||
$httpstatus = REST_Controller::HTTP_OK;
|
$httpstatus = REST_Controller::HTTP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->response($payload, $httpstatus);
|
$this->response($payload, $httpstatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function personUpdate_post()
|
public function personUpdate_post()
|
||||||
{
|
{
|
||||||
$result = $this->person_model->updatePerson($this->post());
|
$result = $this->person_model->updatePerson($this->post());
|
||||||
if($result != FALSE)
|
if($result != FALSE)
|
||||||
{
|
{
|
||||||
$httpstatus = REST_Controller::HTTP_OK;
|
$httpstatus = REST_Controller::HTTP_OK;
|
||||||
$payload = [
|
$payload = [
|
||||||
'success' => true,
|
'success' => true,
|
||||||
'message' => 'Person updated.'
|
'message' => 'Person updated.'
|
||||||
];
|
];
|
||||||
$payload['data'] = $result;
|
$payload['data'] = $result;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$payload = [
|
$payload = [
|
||||||
'success' => false,
|
'success' => false,
|
||||||
'message' => 'Could not update person.'
|
'message' => 'Could not update person.'
|
||||||
];
|
];
|
||||||
$httpstatus = REST_Controller::HTTP_OK;
|
$httpstatus = REST_Controller::HTTP_OK;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
$this->response($payload, $httpstatus);
|
$this->response($payload, $httpstatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function checkBewerbung_get()
|
public function checkBewerbung_get()
|
||||||
{
|
{
|
||||||
$result = $this->person_model->checkBewerbung($this->get("email"),$this->get("studiensemester_kurzbz"));
|
$result = $this->person_model->checkBewerbung($this->get("email"),$this->get("studiensemester_kurzbz"));
|
||||||
$httpstatus = REST_Controller::HTTP_OK;
|
$httpstatus = REST_Controller::HTTP_OK;
|
||||||
$payload = [
|
$payload = [
|
||||||
'success' => true,
|
'success' => true,
|
||||||
'message' => 'Bewerbung exists.'
|
'message' => 'Bewerbung exists.'
|
||||||
];
|
];
|
||||||
$payload['data'] = $result;
|
$payload['data'] = $result;
|
||||||
|
|
||||||
$this->response($payload, $httpstatus);
|
$this->response($payload, $httpstatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function checkZugangscodePerson_get()
|
public function checkZugangscodePerson_get()
|
||||||
{
|
{
|
||||||
$result = $this->person_model->checkZugangscodePerson($this->get("code"));
|
$result = $this->person_model->checkZugangscodePerson($this->get("code"));
|
||||||
$httpstatus = REST_Controller::HTTP_OK;
|
$httpstatus = REST_Controller::HTTP_OK;
|
||||||
if(!empty($result))
|
if(!empty($result))
|
||||||
{
|
{
|
||||||
$payload = [
|
$payload = [
|
||||||
'success' => true,
|
'success' => true,
|
||||||
'message' => 'Zugangscode exists.'
|
'message' => 'Zugangscode exists.'
|
||||||
];
|
];
|
||||||
$payload['data'] = $result;
|
$payload['data'] = $result;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$payload = [
|
$payload = [
|
||||||
'success' => false,
|
'success' => false,
|
||||||
'message' => 'Zugangscode does not exist.'
|
'message' => 'Zugangscode does not exist.'
|
||||||
];
|
];
|
||||||
$httpstatus = REST_Controller::HTTP_OK;
|
$httpstatus = REST_Controller::HTTP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->response($payload, $httpstatus);
|
$this->response($payload, $httpstatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,9 +36,14 @@ class Person extends APIv1_Controller
|
|||||||
// $this->response(array(['success' => false, 'message' => 'access denied']), REST_Controller::HTTP_UNAUTHORIZED);
|
// $this->response(array(['success' => false, 'message' => 'access denied']), REST_Controller::HTTP_UNAUTHORIZED);
|
||||||
|
|
||||||
$code = $this->get('code');
|
$code = $this->get('code');
|
||||||
|
$email = $this->get('email');
|
||||||
$person_id = $this->get('person_id');
|
$person_id = $this->get('person_id');
|
||||||
|
|
||||||
if (! is_null($code))
|
if ((!is_null($code)) && (!is_null($email)))
|
||||||
|
{
|
||||||
|
$result = $this->person_model->getPersonByCodeAndEmail($code, $email);
|
||||||
|
}
|
||||||
|
elseif (! is_null($code))
|
||||||
{
|
{
|
||||||
$result = $this->person_model->getPersonByCode($code);
|
$result = $this->person_model->getPersonByCode($code);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,65 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* FH-Complete
|
||||||
|
*
|
||||||
|
* @package FHC-Helper
|
||||||
|
* @author FHC-Team
|
||||||
|
* @copyright Copyright (c) 2016 fhcomplete.org
|
||||||
|
* @license GPLv3
|
||||||
|
* @link https://fhcomplete.org
|
||||||
|
* @since Version 1.0.0
|
||||||
|
* @filesource
|
||||||
|
*/
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
require_once FCPATH.'include/authentication.class.php';
|
||||||
|
require_once FCPATH.'include/AddonAuthentication.php';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FHC-Auth Helpers
|
||||||
|
*
|
||||||
|
* @package FH-Complete
|
||||||
|
* @subpackage Helpers
|
||||||
|
* @category Helpers
|
||||||
|
* @author FHC-Team
|
||||||
|
* @link http://fhcomplete.org/user_guide/helpers/fhcauth_helper.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class FHC_Auth
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Auth Username, Password over FH-Complete
|
||||||
|
*
|
||||||
|
* @param string $username
|
||||||
|
* @param string $password
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
function auth($username, $password)
|
||||||
|
{
|
||||||
|
$auth = new authentication();
|
||||||
|
if ($auth->checkpassword($username, $password))
|
||||||
|
{
|
||||||
|
//echo 'Auth-Method-True';
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//echo 'Auth-Method-False';
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the md5 hashed password by the addon username
|
||||||
|
*
|
||||||
|
* @param string $username addon username
|
||||||
|
* @return string md5 hashed string
|
||||||
|
*/
|
||||||
|
public function digestAuthentication($username)
|
||||||
|
{
|
||||||
|
$aam = new AddonAuthentication();
|
||||||
|
|
||||||
|
return md5($aam->getPasswordByUsername($username));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1978,12 +1978,19 @@ abstract class REST_Controller extends CI_Controller {
|
|||||||
preg_match_all('@(username|nonce|uri|nc|cnonce|qop|response)=[\'"]?([^\'",]+)@', $digest_string, $matches);
|
preg_match_all('@(username|nonce|uri|nc|cnonce|qop|response)=[\'"]?([^\'",]+)@', $digest_string, $matches);
|
||||||
$digest = (empty($matches[1]) || empty($matches[2])) ? [] : array_combine($matches[1], $matches[2]);
|
$digest = (empty($matches[1]) || empty($matches[2])) ? [] : array_combine($matches[1], $matches[2]);
|
||||||
|
|
||||||
// For digest authentication the library function should return already stored md5(username:restrealm:password) for that username @see rest.php::auth_library_function config
|
// For digest authentication the library function should return
|
||||||
|
// already stored password for that username, even if it is hashed
|
||||||
$username = $this->_check_login($digest['username'], TRUE);
|
$username = $this->_check_login($digest['username'], TRUE);
|
||||||
if (array_key_exists('username', $digest) === FALSE || $username === FALSE)
|
// If there no password
|
||||||
|
if (array_key_exists('username', $digest) === FALSE || $username === FALSE || $username === NULL)
|
||||||
{
|
{
|
||||||
$this->_force_login($unique_id);
|
$this->_force_login($unique_id);
|
||||||
}
|
}
|
||||||
|
// If the password was found for this username, generete the string md5('USERNAME:REALM:PASSWORD')
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$username = md5($digest['username'].":".$this->config->item('rest_realm').":".$username);
|
||||||
|
}
|
||||||
|
|
||||||
$md5 = md5(strtoupper($this->request->method) . ':' . $digest['uri']);
|
$md5 = md5(strtoupper($this->request->method) . ':' . $digest['uri']);
|
||||||
$valid_response = md5($username . ':' . $digest['nonce'] . ':' . $digest['nc'] . ':' . $digest['cnonce'] . ':' . $digest['qop'] . ':' . $md5);
|
$valid_response = md5($username . ':' . $digest['nonce'] . ':' . $digest['nc'] . ':' . $digest['cnonce'] . ':' . $digest['qop'] . ':' . $md5);
|
||||||
|
|||||||
@@ -30,8 +30,15 @@ class Person_model extends DB_Model
|
|||||||
->where("k.kontakt", $email);
|
->where("k.kontakt", $email);
|
||||||
|
|
||||||
return $this->db->get()->result_object();
|
return $this->db->get()->result_object();
|
||||||
// $query = $this->db->get_where('public.tbl_person p ', array('zugangscode' => $code));
|
// }
|
||||||
// return $query->result_object();
|
}
|
||||||
|
|
||||||
|
public function getPersonByCode($code)
|
||||||
|
{
|
||||||
|
// if ($this->fhc_db_acl->bb->isBerechtigt('person', 'suid'))
|
||||||
|
// {
|
||||||
|
$query = $this->db->get_where('public.tbl_person', array('zugangscode' => $code));
|
||||||
|
return $query->result_object();
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This class requires only DB functionalities from CI
|
||||||
|
* CI_Hack couldn't be included here because this class is called every time an addon
|
||||||
|
* makes an API call, so it would raise a lot of "already declared" errors
|
||||||
|
*/
|
||||||
|
require_once('/var/www/fhc/fhcomplete/vendor/codeigniter/framework/system/core/Model.php');
|
||||||
|
require_once(dirname(__FILE__).'/../application/core/FHC_Model.php');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is used to authenticate the addons on the core system
|
||||||
|
*/
|
||||||
|
class AddonAuthentication extends DB_Model
|
||||||
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* It retrieves the password with the given username from ci_addons table
|
||||||
|
* CREATE TABLE ci_addons (
|
||||||
|
* username varchar(10),
|
||||||
|
* password varchar(40),
|
||||||
|
* enabled integer,
|
||||||
|
* CONSTRAINT ci_addons_pk UNIQUE(username));
|
||||||
|
*/
|
||||||
|
public function getPasswordByUsername($username)
|
||||||
|
{
|
||||||
|
$password = NULL;
|
||||||
|
$sql = "SELECT password FROM public.ci_addons WHERE enabled = 1 AND username = ?";
|
||||||
|
|
||||||
|
$result = $this->db->query($sql, array($username));
|
||||||
|
|
||||||
|
if(!is_null($result) && $result->num_rows() > 0)
|
||||||
|
{
|
||||||
|
$password = $result->row()->password;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $password;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,6 +11,8 @@ build_settings:
|
|||||||
user: 'fhcomplete'
|
user: 'fhcomplete'
|
||||||
pass: 'fhcomplete'
|
pass: 'fhcomplete'
|
||||||
setup:
|
setup:
|
||||||
|
shell:
|
||||||
|
- "pkill -f fhctest &"
|
||||||
composer:
|
composer:
|
||||||
directory: ""
|
directory: ""
|
||||||
action: "install"
|
action: "install"
|
||||||
|
|||||||
@@ -30752,7 +30752,7 @@ INSERT INTO tbl_aufmerksamdurch VALUES ('DivMessen', 'Diverse Messen', NULL);
|
|||||||
-- Data for Name: tbl_benutzer; Type: TABLE DATA; Schema: public; Owner: postgres
|
-- Data for Name: tbl_benutzer; Type: TABLE DATA; Schema: public; Owner: postgres
|
||||||
--
|
--
|
||||||
|
|
||||||
INSERT INTO tbl_benutzer VALUES ('administrator', 1, true, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
INSERT INTO tbl_benutzer VALUES ('admin', 1, true, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||||
INSERT INTO tbl_benutzer VALUES ('_DummyLektor', 2, true, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
INSERT INTO tbl_benutzer VALUES ('_DummyLektor', 2, true, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||||
|
|
||||||
|
|
||||||
@@ -36107,6 +36107,7 @@ INSERT INTO tbl_berechtigung VALUES ('assistenz', 'Assistenz');
|
|||||||
INSERT INTO tbl_berechtigung VALUES ('news', 'News eintragen');
|
INSERT INTO tbl_berechtigung VALUES ('news', 'News eintragen');
|
||||||
INSERT INTO tbl_berechtigung VALUES ('preinteressent', 'Verwaltung der Preinteressenten');
|
INSERT INTO tbl_berechtigung VALUES ('preinteressent', 'Verwaltung der Preinteressenten');
|
||||||
INSERT INTO tbl_berechtigung VALUES ('veranstaltung', 'Berechtigungen fuer Veranstaltungen wie Jahresplan');
|
INSERT INTO tbl_berechtigung VALUES ('veranstaltung', 'Berechtigungen fuer Veranstaltungen wie Jahresplan');
|
||||||
|
INSERT INTO tbl_berechtigung VALUES ('basis/vilesci', 'Berechtigungen fuer VileSci');
|
||||||
INSERT INTO tbl_berechtigung VALUES ('basis/berechtigung', 'Berechtigungsverwaltung');
|
INSERT INTO tbl_berechtigung VALUES ('basis/berechtigung', 'Berechtigungsverwaltung');
|
||||||
INSERT INTO tbl_berechtigung VALUES ('basis/variable', 'Variablenverwaltung');
|
INSERT INTO tbl_berechtigung VALUES ('basis/variable', 'Variablenverwaltung');
|
||||||
INSERT INTO tbl_berechtigung VALUES ('basis/studiengang', 'Studiengangsverwaltung');
|
INSERT INTO tbl_berechtigung VALUES ('basis/studiengang', 'Studiengangsverwaltung');
|
||||||
@@ -36242,6 +36243,7 @@ INSERT INTO tbl_rolleberechtigung VALUES ('basis/person', 'admin', 'suid');
|
|||||||
INSERT INTO tbl_rolleberechtigung VALUES ('basis/studiengang', 'admin', 'suid');
|
INSERT INTO tbl_rolleberechtigung VALUES ('basis/studiengang', 'admin', 'suid');
|
||||||
INSERT INTO tbl_rolleberechtigung VALUES ('basis/testtool', 'admin', 'suid');
|
INSERT INTO tbl_rolleberechtigung VALUES ('basis/testtool', 'admin', 'suid');
|
||||||
INSERT INTO tbl_rolleberechtigung VALUES ('basis/variable', 'admin', 'suid');
|
INSERT INTO tbl_rolleberechtigung VALUES ('basis/variable', 'admin', 'suid');
|
||||||
|
INSERT INTO tbl_rolleberechtigung VALUES ('basis/vilesci', 'admin', 'suid');
|
||||||
INSERT INTO tbl_rolleberechtigung VALUES ('info/news', 'admin', 'suid');
|
INSERT INTO tbl_rolleberechtigung VALUES ('info/news', 'admin', 'suid');
|
||||||
INSERT INTO tbl_rolleberechtigung VALUES ('info/veranstaltungsplan', 'admin', 'suid');
|
INSERT INTO tbl_rolleberechtigung VALUES ('info/veranstaltungsplan', 'admin', 'suid');
|
||||||
INSERT INTO tbl_rolleberechtigung VALUES ('lehre/abgabetool', 'admin', 'suid');
|
INSERT INTO tbl_rolleberechtigung VALUES ('lehre/abgabetool', 'admin', 'suid');
|
||||||
|
|||||||
@@ -9,17 +9,15 @@ settings:
|
|||||||
colors: true
|
colors: true
|
||||||
memory_limit: 1024M
|
memory_limit: 1024M
|
||||||
modules:
|
modules:
|
||||||
enabled:
|
enabled:
|
||||||
- Db
|
- Db:
|
||||||
config:
|
dsn: 'pgsql:host=localhost;port=5432;dbname=fhctest'
|
||||||
Db:
|
user: 'fhcomplete'
|
||||||
dsn: 'pgsql:host=localhost;port=5432;dbname=fhctest'
|
password: 'fhcomplete'
|
||||||
user: 'fhcomplete'
|
dump: codeception/_data/dump.sql
|
||||||
password: 'fhcomplete'
|
populate: true
|
||||||
dump: codeception/_data/dump.sql
|
cleanup: false
|
||||||
populate: true
|
reconnect: false
|
||||||
cleanup: false
|
|
||||||
reconnect: false
|
|
||||||
coverage:
|
coverage:
|
||||||
enabled: true
|
enabled: true
|
||||||
include:
|
include:
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,393 +0,0 @@
|
|||||||
<?php //[STAMP] ac0c4ccd4e75ef94ab4633dfbd798e7a
|
|
||||||
namespace _generated;
|
|
||||||
|
|
||||||
// This class was automatically generated by build task
|
|
||||||
// You should not change it manually as it will be overwritten on next build
|
|
||||||
// @codingStandardsIgnoreFile
|
|
||||||
|
|
||||||
use Codeception\Module\Filesystem;
|
|
||||||
use Codeception\Module\FunctionalHelper;
|
|
||||||
|
|
||||||
trait FunctionalTesterActions
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @return \Codeception\Scenario
|
|
||||||
*/
|
|
||||||
abstract protected function getScenario();
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Enters a directory In local filesystem.
|
|
||||||
* Project root directory is used by default
|
|
||||||
*
|
|
||||||
* @param $path
|
|
||||||
* @see \Codeception\Module\Filesystem::amInPath()
|
|
||||||
*/
|
|
||||||
public function amInPath($path) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Condition('amInPath', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Opens a file and stores it's content.
|
|
||||||
*
|
|
||||||
* Usage:
|
|
||||||
*
|
|
||||||
* ``` php
|
|
||||||
* <?php
|
|
||||||
* $I->openFile('composer.json');
|
|
||||||
* $I->seeInThisFile('codeception/codeception');
|
|
||||||
* ?>
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* @param $filename
|
|
||||||
* @see \Codeception\Module\Filesystem::openFile()
|
|
||||||
*/
|
|
||||||
public function openFile($filename) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('openFile', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Deletes a file
|
|
||||||
*
|
|
||||||
* ``` php
|
|
||||||
* <?php
|
|
||||||
* $I->deleteFile('composer.lock');
|
|
||||||
* ?>
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* @param $filename
|
|
||||||
* @see \Codeception\Module\Filesystem::deleteFile()
|
|
||||||
*/
|
|
||||||
public function deleteFile($filename) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('deleteFile', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Deletes directory with all subdirectories
|
|
||||||
*
|
|
||||||
* ``` php
|
|
||||||
* <?php
|
|
||||||
* $I->deleteDir('vendor');
|
|
||||||
* ?>
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* @param $dirname
|
|
||||||
* @see \Codeception\Module\Filesystem::deleteDir()
|
|
||||||
*/
|
|
||||||
public function deleteDir($dirname) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('deleteDir', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Copies directory with all contents
|
|
||||||
*
|
|
||||||
* ``` php
|
|
||||||
* <?php
|
|
||||||
* $I->copyDir('vendor','old_vendor');
|
|
||||||
* ?>
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* @param $src
|
|
||||||
* @param $dst
|
|
||||||
* @see \Codeception\Module\Filesystem::copyDir()
|
|
||||||
*/
|
|
||||||
public function copyDir($src, $dst) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('copyDir', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks If opened file has `text` in it.
|
|
||||||
*
|
|
||||||
* Usage:
|
|
||||||
*
|
|
||||||
* ``` php
|
|
||||||
* <?php
|
|
||||||
* $I->openFile('composer.json');
|
|
||||||
* $I->seeInThisFile('codeception/codeception');
|
|
||||||
* ?>
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* @param $text
|
|
||||||
* Conditional Assertion: Test won't be stopped on fail
|
|
||||||
* @see \Codeception\Module\Filesystem::seeInThisFile()
|
|
||||||
*/
|
|
||||||
public function canSeeInThisFile($text) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInThisFile', func_get_args()));
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks If opened file has `text` in it.
|
|
||||||
*
|
|
||||||
* Usage:
|
|
||||||
*
|
|
||||||
* ``` php
|
|
||||||
* <?php
|
|
||||||
* $I->openFile('composer.json');
|
|
||||||
* $I->seeInThisFile('codeception/codeception');
|
|
||||||
* ?>
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* @param $text
|
|
||||||
* @see \Codeception\Module\Filesystem::seeInThisFile()
|
|
||||||
*/
|
|
||||||
public function seeInThisFile($text) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInThisFile', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks If opened file has the `number` of new lines.
|
|
||||||
*
|
|
||||||
* Usage:
|
|
||||||
*
|
|
||||||
* ``` php
|
|
||||||
* <?php
|
|
||||||
* $I->openFile('composer.json');
|
|
||||||
* $I->seeNumberNewLines(5);
|
|
||||||
* ?>
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* @param int $number New lines
|
|
||||||
* Conditional Assertion: Test won't be stopped on fail
|
|
||||||
* @see \Codeception\Module\Filesystem::seeNumberNewLines()
|
|
||||||
*/
|
|
||||||
public function canSeeNumberNewLines($number) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberNewLines', func_get_args()));
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks If opened file has the `number` of new lines.
|
|
||||||
*
|
|
||||||
* Usage:
|
|
||||||
*
|
|
||||||
* ``` php
|
|
||||||
* <?php
|
|
||||||
* $I->openFile('composer.json');
|
|
||||||
* $I->seeNumberNewLines(5);
|
|
||||||
* ?>
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* @param int $number New lines
|
|
||||||
* @see \Codeception\Module\Filesystem::seeNumberNewLines()
|
|
||||||
*/
|
|
||||||
public function seeNumberNewLines($number) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeNumberNewLines', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks the strict matching of file contents.
|
|
||||||
* Unlike `seeInThisFile` will fail if file has something more than expected lines.
|
|
||||||
* Better to use with HEREDOC strings.
|
|
||||||
* Matching is done after removing "\r" chars from file content.
|
|
||||||
*
|
|
||||||
* ``` php
|
|
||||||
* <?php
|
|
||||||
* $I->openFile('process.pid');
|
|
||||||
* $I->seeFileContentsEqual('3192');
|
|
||||||
* ?>
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* @param $text
|
|
||||||
* Conditional Assertion: Test won't be stopped on fail
|
|
||||||
* @see \Codeception\Module\Filesystem::seeFileContentsEqual()
|
|
||||||
*/
|
|
||||||
public function canSeeFileContentsEqual($text) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeFileContentsEqual', func_get_args()));
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks the strict matching of file contents.
|
|
||||||
* Unlike `seeInThisFile` will fail if file has something more than expected lines.
|
|
||||||
* Better to use with HEREDOC strings.
|
|
||||||
* Matching is done after removing "\r" chars from file content.
|
|
||||||
*
|
|
||||||
* ``` php
|
|
||||||
* <?php
|
|
||||||
* $I->openFile('process.pid');
|
|
||||||
* $I->seeFileContentsEqual('3192');
|
|
||||||
* ?>
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* @param $text
|
|
||||||
* @see \Codeception\Module\Filesystem::seeFileContentsEqual()
|
|
||||||
*/
|
|
||||||
public function seeFileContentsEqual($text) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeFileContentsEqual', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks If opened file doesn't contain `text` in it
|
|
||||||
*
|
|
||||||
* ``` php
|
|
||||||
* <?php
|
|
||||||
* $I->openFile('composer.json');
|
|
||||||
* $I->dontSeeInThisFile('codeception/codeception');
|
|
||||||
* ?>
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* @param $text
|
|
||||||
* Conditional Assertion: Test won't be stopped on fail
|
|
||||||
* @see \Codeception\Module\Filesystem::dontSeeInThisFile()
|
|
||||||
*/
|
|
||||||
public function cantSeeInThisFile($text) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInThisFile', func_get_args()));
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks If opened file doesn't contain `text` in it
|
|
||||||
*
|
|
||||||
* ``` php
|
|
||||||
* <?php
|
|
||||||
* $I->openFile('composer.json');
|
|
||||||
* $I->dontSeeInThisFile('codeception/codeception');
|
|
||||||
* ?>
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* @param $text
|
|
||||||
* @see \Codeception\Module\Filesystem::dontSeeInThisFile()
|
|
||||||
*/
|
|
||||||
public function dontSeeInThisFile($text) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInThisFile', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Deletes a file
|
|
||||||
* @see \Codeception\Module\Filesystem::deleteThisFile()
|
|
||||||
*/
|
|
||||||
public function deleteThisFile() {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('deleteThisFile', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks if file exists in path.
|
|
||||||
* Opens a file when it's exists
|
|
||||||
*
|
|
||||||
* ``` php
|
|
||||||
* <?php
|
|
||||||
* $I->seeFileFound('UserModel.php','app/models');
|
|
||||||
* ?>
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* @param $filename
|
|
||||||
* @param string $path
|
|
||||||
* Conditional Assertion: Test won't be stopped on fail
|
|
||||||
* @see \Codeception\Module\Filesystem::seeFileFound()
|
|
||||||
*/
|
|
||||||
public function canSeeFileFound($filename, $path = null) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeFileFound', func_get_args()));
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks if file exists in path.
|
|
||||||
* Opens a file when it's exists
|
|
||||||
*
|
|
||||||
* ``` php
|
|
||||||
* <?php
|
|
||||||
* $I->seeFileFound('UserModel.php','app/models');
|
|
||||||
* ?>
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* @param $filename
|
|
||||||
* @param string $path
|
|
||||||
* @see \Codeception\Module\Filesystem::seeFileFound()
|
|
||||||
*/
|
|
||||||
public function seeFileFound($filename, $path = null) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeFileFound', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks if file does not exist in path
|
|
||||||
*
|
|
||||||
* @param $filename
|
|
||||||
* @param string $path
|
|
||||||
* Conditional Assertion: Test won't be stopped on fail
|
|
||||||
* @see \Codeception\Module\Filesystem::dontSeeFileFound()
|
|
||||||
*/
|
|
||||||
public function cantSeeFileFound($filename, $path = null) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeFileFound', func_get_args()));
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks if file does not exist in path
|
|
||||||
*
|
|
||||||
* @param $filename
|
|
||||||
* @param string $path
|
|
||||||
* @see \Codeception\Module\Filesystem::dontSeeFileFound()
|
|
||||||
*/
|
|
||||||
public function dontSeeFileFound($filename, $path = null) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeFileFound', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Erases directory contents
|
|
||||||
*
|
|
||||||
* ``` php
|
|
||||||
* <?php
|
|
||||||
* $I->cleanDir('logs');
|
|
||||||
* ?>
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* @param $dirname
|
|
||||||
* @see \Codeception\Module\Filesystem::cleanDir()
|
|
||||||
*/
|
|
||||||
public function cleanDir($dirname) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('cleanDir', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Saves contents to file
|
|
||||||
*
|
|
||||||
* @param $filename
|
|
||||||
* @param $contents
|
|
||||||
* @see \Codeception\Module\Filesystem::writeToFile()
|
|
||||||
*/
|
|
||||||
public function writeToFile($filename, $contents) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('writeToFile', func_get_args()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,344 +0,0 @@
|
|||||||
<?php //[STAMP] 5b9926709c0cff5b7af2d9cd7120bf7a
|
|
||||||
namespace _generated;
|
|
||||||
|
|
||||||
// This class was automatically generated by build task
|
|
||||||
// You should not change it manually as it will be overwritten on next build
|
|
||||||
// @codingStandardsIgnoreFile
|
|
||||||
|
|
||||||
use Codeception\Module\Asserts;
|
|
||||||
use Codeception\Module\UnitHelper;
|
|
||||||
|
|
||||||
trait UnitTesterActions
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @return \Codeception\Scenario
|
|
||||||
*/
|
|
||||||
abstract protected function getScenario();
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks that two variables are equal.
|
|
||||||
*
|
|
||||||
* @param $expected
|
|
||||||
* @param $actual
|
|
||||||
* @param string $message
|
|
||||||
* @see \Codeception\Module\Asserts::assertEquals()
|
|
||||||
*/
|
|
||||||
public function assertEquals($expected, $actual, $message = null) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEquals', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks that two variables are not equal
|
|
||||||
*
|
|
||||||
* @param $expected
|
|
||||||
* @param $actual
|
|
||||||
* @param string $message
|
|
||||||
* @see \Codeception\Module\Asserts::assertNotEquals()
|
|
||||||
*/
|
|
||||||
public function assertNotEquals($expected, $actual, $message = null) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEquals', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks that two variables are same
|
|
||||||
*
|
|
||||||
* @param $expected
|
|
||||||
* @param $actual
|
|
||||||
* @param string $message
|
|
||||||
* @see \Codeception\Module\Asserts::assertSame()
|
|
||||||
*/
|
|
||||||
public function assertSame($expected, $actual, $message = null) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertSame', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks that two variables are not same
|
|
||||||
*
|
|
||||||
* @param $expected
|
|
||||||
* @param $actual
|
|
||||||
* @param string $message
|
|
||||||
* @see \Codeception\Module\Asserts::assertNotSame()
|
|
||||||
*/
|
|
||||||
public function assertNotSame($expected, $actual, $message = null) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSame', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks that actual is greater than expected
|
|
||||||
*
|
|
||||||
* @param $expected
|
|
||||||
* @param $actual
|
|
||||||
* @param string $message
|
|
||||||
* @see \Codeception\Module\Asserts::assertGreaterThan()
|
|
||||||
*/
|
|
||||||
public function assertGreaterThan($expected, $actual, $message = null) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThan', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* @deprecated
|
|
||||||
* @see \Codeception\Module\Asserts::assertGreaterThen()
|
|
||||||
*/
|
|
||||||
public function assertGreaterThen($expected, $actual, $message = null) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThen', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks that actual is greater or equal than expected
|
|
||||||
*
|
|
||||||
* @param $expected
|
|
||||||
* @param $actual
|
|
||||||
* @param string $message
|
|
||||||
* @see \Codeception\Module\Asserts::assertGreaterThanOrEqual()
|
|
||||||
*/
|
|
||||||
public function assertGreaterThanOrEqual($expected, $actual, $message = null) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThanOrEqual', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* @deprecated
|
|
||||||
* @see \Codeception\Module\Asserts::assertGreaterThenOrEqual()
|
|
||||||
*/
|
|
||||||
public function assertGreaterThenOrEqual($expected, $actual, $message = null) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThenOrEqual', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks that actual is less than expected
|
|
||||||
*
|
|
||||||
* @param $expected
|
|
||||||
* @param $actual
|
|
||||||
* @param string $message
|
|
||||||
* @see \Codeception\Module\Asserts::assertLessThan()
|
|
||||||
*/
|
|
||||||
public function assertLessThan($expected, $actual, $message = null) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThan', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks that actual is less or equal than expected
|
|
||||||
*
|
|
||||||
* @param $expected
|
|
||||||
* @param $actual
|
|
||||||
* @param string $message
|
|
||||||
* @see \Codeception\Module\Asserts::assertLessThanOrEqual()
|
|
||||||
*/
|
|
||||||
public function assertLessThanOrEqual($expected, $actual, $message = null) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThanOrEqual', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks that haystack contains needle
|
|
||||||
*
|
|
||||||
* @param $needle
|
|
||||||
* @param $haystack
|
|
||||||
* @param string $message
|
|
||||||
* @see \Codeception\Module\Asserts::assertContains()
|
|
||||||
*/
|
|
||||||
public function assertContains($needle, $haystack, $message = null) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContains', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks that haystack doesn't contain needle.
|
|
||||||
*
|
|
||||||
* @param $needle
|
|
||||||
* @param $haystack
|
|
||||||
* @param string $message
|
|
||||||
* @see \Codeception\Module\Asserts::assertNotContains()
|
|
||||||
*/
|
|
||||||
public function assertNotContains($needle, $haystack, $message = null) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContains', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks that string match with pattern
|
|
||||||
*
|
|
||||||
* @param string $pattern
|
|
||||||
* @param string $string
|
|
||||||
* @param string $message
|
|
||||||
* @see \Codeception\Module\Asserts::assertRegExp()
|
|
||||||
*/
|
|
||||||
public function assertRegExp($pattern, $string, $message = null) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertRegExp', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks that string not match with pattern
|
|
||||||
*
|
|
||||||
* @param string $pattern
|
|
||||||
* @param string $string
|
|
||||||
* @param string $message
|
|
||||||
* @see \Codeception\Module\Asserts::assertNotRegExp()
|
|
||||||
*/
|
|
||||||
public function assertNotRegExp($pattern, $string, $message = null) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotRegExp', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks that variable is empty.
|
|
||||||
*
|
|
||||||
* @param $actual
|
|
||||||
* @param string $message
|
|
||||||
* @see \Codeception\Module\Asserts::assertEmpty()
|
|
||||||
*/
|
|
||||||
public function assertEmpty($actual, $message = null) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEmpty', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks that variable is not empty.
|
|
||||||
*
|
|
||||||
* @param $actual
|
|
||||||
* @param string $message
|
|
||||||
* @see \Codeception\Module\Asserts::assertNotEmpty()
|
|
||||||
*/
|
|
||||||
public function assertNotEmpty($actual, $message = null) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEmpty', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks that variable is NULL
|
|
||||||
*
|
|
||||||
* @param $actual
|
|
||||||
* @param string $message
|
|
||||||
* @see \Codeception\Module\Asserts::assertNull()
|
|
||||||
*/
|
|
||||||
public function assertNull($actual, $message = null) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNull', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks that variable is not NULL
|
|
||||||
*
|
|
||||||
* @param $actual
|
|
||||||
* @param string $message
|
|
||||||
* @see \Codeception\Module\Asserts::assertNotNull()
|
|
||||||
*/
|
|
||||||
public function assertNotNull($actual, $message = null) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotNull', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks that condition is positive.
|
|
||||||
*
|
|
||||||
* @param $condition
|
|
||||||
* @param string $message
|
|
||||||
* @see \Codeception\Module\Asserts::assertTrue()
|
|
||||||
*/
|
|
||||||
public function assertTrue($condition, $message = null) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertTrue', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks that condition is negative.
|
|
||||||
*
|
|
||||||
* @param $condition
|
|
||||||
* @param string $message
|
|
||||||
* @see \Codeception\Module\Asserts::assertFalse()
|
|
||||||
*/
|
|
||||||
public function assertFalse($condition, $message = null) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFalse', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks if file exists
|
|
||||||
*
|
|
||||||
* @param string $filename
|
|
||||||
* @param string $message
|
|
||||||
* @see \Codeception\Module\Asserts::assertFileExists()
|
|
||||||
*/
|
|
||||||
public function assertFileExists($filename, $message = null) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileExists', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks if file doesn't exist
|
|
||||||
*
|
|
||||||
* @param string $filename
|
|
||||||
* @param string $message
|
|
||||||
* @see \Codeception\Module\Asserts::assertFileNotExists()
|
|
||||||
*/
|
|
||||||
public function assertFileNotExists($filename, $message = null) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotExists', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Fails the test with message.
|
|
||||||
*
|
|
||||||
* @param $message
|
|
||||||
* @see \Codeception\Module\Asserts::fail()
|
|
||||||
*/
|
|
||||||
public function fail($message) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('fail', func_get_args()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -9,6 +9,15 @@ modules:
|
|||||||
enabled:
|
enabled:
|
||||||
- PhpBrowser
|
- PhpBrowser
|
||||||
- AcceptanceHelper
|
- AcceptanceHelper
|
||||||
|
- Db
|
||||||
config:
|
config:
|
||||||
PhpBrowser:
|
PhpBrowser:
|
||||||
url: 'http://admin:1q2w3@localhost/build/'
|
url: 'http://admin:1q2w3@localhost/build/'
|
||||||
|
Db:
|
||||||
|
dsn: 'pgsql:host=localhost;port=5432;dbname=fhctest'
|
||||||
|
user: 'fhcomplete'
|
||||||
|
password: 'fhcomplete'
|
||||||
|
dump: codeception/_data/dump.sql
|
||||||
|
populate: true
|
||||||
|
cleanup: false
|
||||||
|
reconnect: false
|
||||||
|
|||||||
Reference in New Issue
Block a user