Properties

$ClassName

$ClassName : string

Testing class name.

Type

string

Methods

test_construct_1()

test_construct_1() 

Testing connect method.

test_construct_2()

test_construct_2() 

Testing connect method.

test_construct_3()

test_construct_3() 

Testing connect method.

test_new_records_since()

test_new_records_since() 

Testing getting last created records.

test_records_count0()

test_records_count0() 

Testing getting amount of records.

test_records_count1()

test_records_count1() 

Testing getting amount of records.

test_last_records()

test_last_records() 

Method tests last N records returning.

test_records_count_by_existing_field()

test_records_count_by_existing_field() 

Testing getting amount of records.

test_Records_count_by_not_existing_field()

test_Records_count_by_not_existing_field() 

Testing getting amount of records.

test_construct()

test_construct() 

Testing constructor.

test_create_record()

test_create_record() 

Method tests record creation.

test_insert_basic_fields()

test_insert_basic_fields() 

Method tests insert_basic_fields method.

test_delete_filtered()

test_delete_filtered() 

Method tests filtered deletion.

test_delete_record()

test_delete_record() 

Method tests deletion.

test_get_by_id()

test_get_by_id() 

Checking get_by_id method.

test_get_by_ids()

test_get_by_ids() 

Checking get_by_id method.

test_add_title()

test_add_title() 

Testing add_title method.

test_add_compiled_fields()

test_add_compiled_fields() 

Testing add_compiled_fields method.

test_list_page()

test_list_page() 

Testing list page generation.

test_list_page_simple()

test_list_page_simple() 

Testing list page generation.

test_get_domain_id_cross_domain_enabled()

test_get_domain_id_cross_domain_enabled() 

Testing domain_id fetching.

test_get_domain_id_cross_domain_disabled()

test_get_domain_id_cross_domain_disabled() 

Testing domain_id fetching.

check_logic_parts()

check_logic_parts(object  $Logic, string  $Msg) 

Method tests creation of the logis's parts.

Parameters

object $Logic
  • ServiceLogic object.
string $Msg
  • Error message.

get_fields_algorithms_mock()

get_fields_algorithms_mock() : object

Method returns FieldsAlgorothms mock.

Returns

object —

FieldsAlgorothms mock

get_model_mock()

get_model_mock(object  $ConnectionMock) : object

Method returns model's mock.

Parameters

object $ConnectionMock
  • Mock of the connection.

Returns

object —

Mock of the model.

get_connection_mock()

get_connection_mock(integer  $Mode) 

Method returns mock of the DB connection.

Parameters

integer $Mode
  • Mock creation mode.

init_logic_mock_fields()

init_logic_mock_fields(object  $Mock, array  $Fields) 

Method inits logic mock fields.

Parameters

object $Mock
  • Logic mock;
array $Fields
  • Fields description.

get_crud_service_logic_mock()

get_crud_service_logic_mock(object  $Model = false, object  $Connection = false, array  $Methods = array('get_connection')) : object

Method returns CRUDServiceLogic mock.

Parameters

object $Model
  • Model mock.
object $Connection
  • Connection mock.
array $Methods

Returns

object —

CRUDServiceLogic mock.

get_logic_model_mock()

get_logic_model_mock(array  $MustCallModelMethods = array()) : object

Method returns setup mock.

Parameters

array $MustCallModelMethods
  • Listof methods wich must be called precisely once.

Returns

object —

Logic mock.

get_service_model_mock()

get_service_model_mock(array  $Methods = array()) : object

Method returnsservice model.

Parameters

array $Methods
  • Methods to be mocked.

Returns

object —

Service model.

get_service_logic_mock()

get_service_logic_mock(\object  $Model, array  $Methods = array()) : object

Method returns logic mock.

Parameters

\object $Model
array $Methods
  • Methods to be mocked.

Returns

object —

Logic mock.