/** * @depends test_rpcf_add_user_new */ public function test_init_api_user() { $this->_config['login'] = '******' . self::prefix(); $this->_config['password'] = '******' . self::prefix(); $this->_config['admin'] = FALSE; $api_user = URFAClient::init($this->_config); $this->assertInstanceOf('URFAClient_Collector', $api_user); return $api_user; }
/** * Создаем соединение для тестов */ protected function setUp() { $this->_api = URFAClient::init($this->_config); }
Array ( [user_id] => 13 [basic_account] => 13 ) */ print_r(URFAClient::trace_log()); /* Array ( [0] => 2014.07.28 15:30:31 INFO: rpcf_liburfa_list( Array ( ) ) -> Array ( [size] => Array ( [0] => Array ( [module] => liburfa-card [version] => 5.3-002-update5-bsd9 [path] => liburfa-card ) [1] => Array ( [module] => liburfa-dealer [version] => 5.3-002-update5-bsd9 [path] => liburfa-dealer ) [2] => ... ) ) [1] => 2014.07.28 15:30:32 INFO: rpcf_add_user_new( Array ( [login] => test [password] => test [parameters_count] => Array ( ) [groups_count] => Array ( ) ) ) -> Array ( [user_id] => 13 [basic_account] => 13 ) ) */ /********** Пользователь **********/ $urfa = URFAClient::init(array('login' => 'test', 'password' => 'test', 'address' => 'bill.example.org', 'admin' => FALSE)); /* <function name="rpcf_user5_change_password" id="-0x4021"> <input> <string name="old_password" /> <string name="new_password" /> <string name="new_password_ret" /> </input> <output> <integer name="result" /> </output> </function> */ $result = $urfa->rpcf_user5_change_password(array('old_password' => 'test', 'new_password' => 'test_new', 'new_password_ret' => 'test_new')); /* Array