PageRenderTime 51ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/tests/navigationlib_test.php

https://bitbucket.org/synergylearning/campusconnect
PHP | 571 lines | 398 code | 99 blank | 74 comment | 13 complexity | 6917e82d052ef61c5507f02bad7ee267 MD5 | raw file
Possible License(s): MPL-2.0-no-copyleft-exception, LGPL-3.0, GPL-3.0, LGPL-2.1, Apache-2.0, BSD-3-Clause, AGPL-3.0
  1. <?php
  2. // This file is part of Moodle - http://moodle.org/
  3. //
  4. // Moodle is free software: you can redistribute it and/or modify
  5. // it under the terms of the GNU General Public License as published by
  6. // the Free Software Foundation, either version 3 of the License, or
  7. // (at your option) any later version.
  8. //
  9. // Moodle is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU General Public License
  15. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
  16. /**
  17. * Unit tests for lib/navigationlib.php
  18. *
  19. * @package core
  20. * @category phpunit
  21. * @copyright 2009 Sam Hemelryk
  22. * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later (5)
  23. */
  24. defined('MOODLE_INTERNAL') || die();
  25. global $CFG;
  26. require_once($CFG->libdir . '/navigationlib.php');
  27. class core_navigationlib_testcase extends advanced_testcase {
  28. /**
  29. * @var navigation_node
  30. */
  31. public $node;
  32. protected function setup_node() {
  33. global $PAGE, $SITE;
  34. $PAGE->set_url('/');
  35. $PAGE->set_course($SITE);
  36. $activeurl = $PAGE->url;
  37. $inactiveurl = new moodle_url('http://www.moodle.com/');
  38. navigation_node::override_active_url($PAGE->url);
  39. $this->node = new navigation_node('Test Node');
  40. $this->node->type = navigation_node::TYPE_SYSTEM;
  41. // We add the first child without key. This way we make sure all keys search by comparison is performed using ===.
  42. $this->node->add('first child without key', null, navigation_node::TYPE_CUSTOM);
  43. $demo1 = $this->node->add('demo1', $inactiveurl, navigation_node::TYPE_COURSE, null, 'demo1', new pix_icon('i/course', ''));
  44. $demo2 = $this->node->add('demo2', $inactiveurl, navigation_node::TYPE_COURSE, null, 'demo2', new pix_icon('i/course', ''));
  45. $demo3 = $this->node->add('demo3', $inactiveurl, navigation_node::TYPE_CATEGORY, null, 'demo3', new pix_icon('i/course', ''));
  46. $demo4 = $demo3->add('demo4', $inactiveurl, navigation_node::TYPE_COURSE, null, 'demo4', new pix_icon('i/course', ''));
  47. $demo5 = $demo3->add('demo5', $activeurl, navigation_node::TYPE_COURSE, null, 'demo5', new pix_icon('i/course', ''));
  48. $demo5->add('activity1', null, navigation_node::TYPE_ACTIVITY, null, 'activity1')->make_active();
  49. $hiddendemo1 = $this->node->add('hiddendemo1', $inactiveurl, navigation_node::TYPE_CATEGORY, null, 'hiddendemo1', new pix_icon('i/course', ''));
  50. $hiddendemo1->hidden = true;
  51. $hiddendemo1->add('hiddendemo2', $inactiveurl, navigation_node::TYPE_COURSE, null, 'hiddendemo2', new pix_icon('i/course', ''))->helpbutton = 'Here is a help button';
  52. $hiddendemo1->add('hiddendemo3', $inactiveurl, navigation_node::TYPE_COURSE, null, 'hiddendemo3', new pix_icon('i/course', ''))->display = false;
  53. }
  54. public function test_node__construct() {
  55. $this->setup_node();
  56. $fakeproperties = array(
  57. 'text' => 'text',
  58. 'shorttext' => 'A very silly extra long short text string, more than 25 characters',
  59. 'key' => 'key',
  60. 'type' => 'navigation_node::TYPE_COURSE',
  61. 'action' => new moodle_url('http://www.moodle.org/'));
  62. $node = new navigation_node($fakeproperties);
  63. $this->assertSame($fakeproperties['text'], $node->text);
  64. $this->assertTrue(strpos($fakeproperties['shorttext'], substr($node->shorttext, 0, -3)) === 0);
  65. $this->assertSame($fakeproperties['key'], $node->key);
  66. $this->assertSame($fakeproperties['type'], $node->type);
  67. $this->assertSame($fakeproperties['action'], $node->action);
  68. }
  69. public function test_node_add() {
  70. $this->setup_node();
  71. // Add a node with all args set.
  72. $node1 = $this->node->add('test_add_1', 'http://www.moodle.org/', navigation_node::TYPE_COURSE, 'testadd1', 'key', new pix_icon('i/course', ''));
  73. // Add a node with the minimum args required.
  74. $node2 = $this->node->add('test_add_2', null, navigation_node::TYPE_CUSTOM, 'testadd2');
  75. $node3 = $this->node->add(str_repeat('moodle ', 15), str_repeat('moodle', 15));
  76. $this->assertInstanceOf('navigation_node', $node1);
  77. $this->assertInstanceOf('navigation_node', $node2);
  78. $this->assertInstanceOf('navigation_node', $node3);
  79. $ref = $this->node->get('key');
  80. $this->assertSame($node1, $ref);
  81. $ref = $this->node->get($node2->key);
  82. $this->assertSame($node2, $ref);
  83. $ref = $this->node->get($node2->key, $node2->type);
  84. $this->assertSame($node2, $ref);
  85. $ref = $this->node->get($node3->key, $node3->type);
  86. $this->assertSame($node3, $ref);
  87. }
  88. public function test_node_add_before() {
  89. $this->setup_node();
  90. // Create 3 nodes.
  91. $node1 = navigation_node::create('test_add_1', null, navigation_node::TYPE_CUSTOM,
  92. 'test 1', 'testadd1');
  93. $node2 = navigation_node::create('test_add_2', null, navigation_node::TYPE_CUSTOM,
  94. 'test 2', 'testadd2');
  95. $node3 = navigation_node::create('test_add_3', null, navigation_node::TYPE_CUSTOM,
  96. 'test 3', 'testadd3');
  97. // Add node 2, then node 1 before 2, then node 3 at end.
  98. $this->node->add_node($node2);
  99. $this->node->add_node($node1, 'testadd2');
  100. $this->node->add_node($node3);
  101. // Check the last 3 nodes are in 1, 2, 3 order and have those indexes.
  102. foreach ($this->node->children as $child) {
  103. $keys[] = $child->key;
  104. }
  105. $this->assertSame('testadd1', $keys[count($keys)-3]);
  106. $this->assertSame('testadd2', $keys[count($keys)-2]);
  107. $this->assertSame('testadd3', $keys[count($keys)-1]);
  108. }
  109. public function test_node_add_class() {
  110. $this->setup_node();
  111. $node = $this->node->get('demo1');
  112. $this->assertInstanceOf('navigation_node', $node);
  113. if ($node !== false) {
  114. $node->add_class('myclass');
  115. $classes = $node->classes;
  116. $this->assertContains('myclass', $classes);
  117. }
  118. }
  119. public function test_node_check_if_active() {
  120. $this->setup_node();
  121. // First test the string urls
  122. // Demo1 -> action is http://www.moodle.org/, thus should be true.
  123. $demo5 = $this->node->find('demo5', navigation_node::TYPE_COURSE);
  124. if ($this->assertInstanceOf('navigation_node', $demo5)) {
  125. $this->assertTrue($demo5->check_if_active());
  126. }
  127. // Demo2 -> action is http://www.moodle.com/, thus should be false.
  128. $demo2 = $this->node->get('demo2');
  129. if ($this->assertInstanceOf('navigation_node', $demo2)) {
  130. $this->assertFalse($demo2->check_if_active());
  131. }
  132. }
  133. public function test_node_contains_active_node() {
  134. $this->setup_node();
  135. // Demo5, and activity1 were set to active during setup.
  136. // Should be true as it contains all nodes.
  137. $this->assertTrue($this->node->contains_active_node());
  138. // Should be true as demo5 is a child of demo3.
  139. $this->assertTrue($this->node->get('demo3')->contains_active_node());
  140. // Obviously duff.
  141. $this->assertFalse($this->node->get('demo1')->contains_active_node());
  142. // Should be true as demo5 contains activity1.
  143. $this->assertTrue($this->node->get('demo3')->get('demo5')->contains_active_node());
  144. // Should be true activity1 is the active node.
  145. $this->assertTrue($this->node->get('demo3')->get('demo5')->get('activity1')->contains_active_node());
  146. // Obviously duff.
  147. $this->assertFalse($this->node->get('demo3')->get('demo4')->contains_active_node());
  148. }
  149. public function test_node_find_active_node() {
  150. $this->setup_node();
  151. $activenode1 = $this->node->find_active_node();
  152. $activenode2 = $this->node->get('demo1')->find_active_node();
  153. if ($this->assertInstanceOf('navigation_node', $activenode1)) {
  154. $ref = $this->node->get('demo3')->get('demo5')->get('activity1');
  155. $this->assertSame($activenode1, $ref);
  156. }
  157. $this->assertNotInstanceOf('navigation_node', $activenode2);
  158. }
  159. public function test_node_find() {
  160. $this->setup_node();
  161. $node1 = $this->node->find('demo1', navigation_node::TYPE_COURSE);
  162. $node2 = $this->node->find('demo5', navigation_node::TYPE_COURSE);
  163. $node3 = $this->node->find('demo5', navigation_node::TYPE_CATEGORY);
  164. $node4 = $this->node->find('demo0', navigation_node::TYPE_COURSE);
  165. $this->assertInstanceOf('navigation_node', $node1);
  166. $this->assertInstanceOf('navigation_node', $node2);
  167. $this->assertNotInstanceOf('navigation_node', $node3);
  168. $this->assertNotInstanceOf('navigation_node', $node4);
  169. }
  170. public function test_node_find_expandable() {
  171. $this->setup_node();
  172. $expandable = array();
  173. $this->node->find_expandable($expandable);
  174. $this->assertCount(0, $expandable);
  175. if (count($expandable) === 4) {
  176. $name = $expandable[0]['key'];
  177. $name .= $expandable[1]['key'];
  178. $name .= $expandable[2]['key'];
  179. $name .= $expandable[3]['key'];
  180. $this->assertSame('demo1demo2demo4hiddendemo2', $name);
  181. }
  182. }
  183. public function test_node_get() {
  184. $this->setup_node();
  185. $node1 = $this->node->get('demo1'); // Exists.
  186. $node2 = $this->node->get('demo4'); // Doesn't exist for this node.
  187. $node3 = $this->node->get('demo0'); // Doesn't exist at all.
  188. $node4 = $this->node->get(false); // Sometimes occurs in nature code.
  189. $this->assertInstanceOf('navigation_node', $node1);
  190. $this->assertFalse($node2);
  191. $this->assertFalse($node3);
  192. $this->assertFalse($node4);
  193. }
  194. public function test_node_get_css_type() {
  195. $this->setup_node();
  196. $csstype1 = $this->node->get('demo3')->get_css_type();
  197. $csstype2 = $this->node->get('demo3')->get('demo5')->get_css_type();
  198. $this->node->get('demo3')->get('demo5')->type = 1000;
  199. $csstype3 = $this->node->get('demo3')->get('demo5')->get_css_type();
  200. $this->assertSame('type_category', $csstype1);
  201. $this->assertSame('type_course', $csstype2);
  202. $this->assertSame('type_unknown', $csstype3);
  203. }
  204. public function test_node_make_active() {
  205. global $CFG;
  206. $this->setup_node();
  207. $node1 = $this->node->add('active node 1', null, navigation_node::TYPE_CUSTOM, null, 'anode1');
  208. $node2 = $this->node->add('active node 2', new moodle_url($CFG->wwwroot), navigation_node::TYPE_COURSE, null, 'anode2');
  209. $node1->make_active();
  210. $this->node->get('anode2')->make_active();
  211. $this->assertTrue($node1->isactive);
  212. $this->assertTrue($this->node->get('anode2')->isactive);
  213. }
  214. public function test_node_remove() {
  215. $this->setup_node();
  216. $remove1 = $this->node->add('child to remove 1', null, navigation_node::TYPE_CUSTOM, null, 'remove1');
  217. $remove2 = $this->node->add('child to remove 2', null, navigation_node::TYPE_CUSTOM, null, 'remove2');
  218. $remove3 = $remove2->add('child to remove 3', null, navigation_node::TYPE_CUSTOM, null, 'remove3');
  219. $this->assertInstanceOf('navigation_node', $remove1);
  220. $this->assertInstanceOf('navigation_node', $remove2);
  221. $this->assertInstanceOf('navigation_node', $remove3);
  222. $this->assertInstanceOf('navigation_node', $this->node->get('remove1'));
  223. $this->assertInstanceOf('navigation_node', $this->node->get('remove2'));
  224. $this->assertInstanceOf('navigation_node', $remove2->get('remove3'));
  225. // Remove element and make sure this is no longer a child.
  226. $this->assertTrue($remove1->remove());
  227. $this->assertFalse($this->node->get('remove1'));
  228. $this->assertFalse(in_array('remove1', $this->node->get_children_key_list(), true));
  229. // Make sure that we can insert element after removal.
  230. $insertelement = navigation_node::create('extra element 4', null, navigation_node::TYPE_CUSTOM, null, 'element4');
  231. $this->node->add_node($insertelement, 'remove2');
  232. $this->assertNotEmpty($this->node->get('element4'));
  233. // Remove more elements.
  234. $this->assertTrue($this->node->get('remove2')->remove());
  235. $this->assertFalse($this->node->get('remove2'));
  236. // Make sure that we can add element after removal.
  237. $this->node->add('extra element 5', null, navigation_node::TYPE_CUSTOM, null, 'element5');
  238. $this->assertNotEmpty($this->node->get('element5'));
  239. $this->assertTrue($remove2->get('remove3')->remove());
  240. $this->assertFalse($this->node->get('remove1'));
  241. $this->assertFalse($this->node->get('remove2'));
  242. }
  243. public function test_node_remove_class() {
  244. $this->setup_node();
  245. $this->node->add_class('testclass');
  246. $this->assertTrue($this->node->remove_class('testclass'));
  247. $this->assertNotContains('testclass', $this->node->classes);
  248. }
  249. public function test_module_extends_navigation() {
  250. $node = new exposed_global_navigation();
  251. // Create an initial tree structure to work with.
  252. $cat1 = $node->add('category 1', null, navigation_node::TYPE_CATEGORY, null, 'cat1');
  253. $cat2 = $node->add('category 2', null, navigation_node::TYPE_CATEGORY, null, 'cat2');
  254. $cat3 = $node->add('category 3', null, navigation_node::TYPE_CATEGORY, null, 'cat3');
  255. $sub1 = $cat2->add('sub category 1', null, navigation_node::TYPE_CATEGORY, null, 'sub1');
  256. $sub2 = $cat2->add('sub category 2', null, navigation_node::TYPE_CATEGORY, null, 'sub2');
  257. $sub3 = $cat2->add('sub category 3', null, navigation_node::TYPE_CATEGORY, null, 'sub3');
  258. $course1 = $sub2->add('course 1', null, navigation_node::TYPE_COURSE, null, 'course1');
  259. $course2 = $sub2->add('course 2', null, navigation_node::TYPE_COURSE, null, 'course2');
  260. $course3 = $sub2->add('course 3', null, navigation_node::TYPE_COURSE, null, 'course3');
  261. $section1 = $course2->add('section 1', null, navigation_node::TYPE_SECTION, null, 'sec1');
  262. $section2 = $course2->add('section 2', null, navigation_node::TYPE_SECTION, null, 'sec2');
  263. $section3 = $course2->add('section 3', null, navigation_node::TYPE_SECTION, null, 'sec3');
  264. $act1 = $section2->add('activity 1', null, navigation_node::TYPE_ACTIVITY, null, 'act1');
  265. $act2 = $section2->add('activity 2', null, navigation_node::TYPE_ACTIVITY, null, 'act2');
  266. $act3 = $section2->add('activity 3', null, navigation_node::TYPE_ACTIVITY, null, 'act3');
  267. $res1 = $section2->add('resource 1', null, navigation_node::TYPE_RESOURCE, null, 'res1');
  268. $res2 = $section2->add('resource 2', null, navigation_node::TYPE_RESOURCE, null, 'res2');
  269. $res3 = $section2->add('resource 3', null, navigation_node::TYPE_RESOURCE, null, 'res3');
  270. $this->assertTrue($node->exposed_module_extends_navigation('data'));
  271. $this->assertFalse($node->exposed_module_extends_navigation('test1'));
  272. }
  273. public function test_navbar_prepend_and_add() {
  274. global $PAGE;
  275. // Unfortunate hack needed because people use global $PAGE around the place.
  276. $PAGE->set_url('/');
  277. // We need to reset after this test because we using the generator.
  278. $this->resetAfterTest();
  279. $generator = self::getDataGenerator();
  280. $cat1 = $generator->create_category();
  281. $cat2 = $generator->create_category(array('parent' => $cat1->id));
  282. $course = $generator->create_course(array('category' => $cat2->id));
  283. $page = new moodle_page();
  284. $page->set_course($course);
  285. $page->set_url(new moodle_url('/course/view.php', array('id' => $course->id)));
  286. $page->navbar->prepend('test 1');
  287. $page->navbar->prepend('test 2');
  288. $page->navbar->add('test 3');
  289. $page->navbar->add('test 4');
  290. $items = $page->navbar->get_items();
  291. foreach ($items as $item) {
  292. $this->assertInstanceOf('navigation_node', $item);
  293. }
  294. $i = 0;
  295. $this->assertSame('test 1', $items[$i++]->text);
  296. $this->assertSame('test 2', $items[$i++]->text);
  297. $this->assertSame('home', $items[$i++]->key);
  298. $this->assertSame('courses', $items[$i++]->key);
  299. $this->assertSame($cat1->id, $items[$i++]->key);
  300. $this->assertSame($cat2->id, $items[$i++]->key);
  301. $this->assertSame($course->id, $items[$i++]->key);
  302. $this->assertSame('test 3', $items[$i++]->text);
  303. $this->assertSame('test 4', $items[$i++]->text);
  304. return $page;
  305. }
  306. /**
  307. * @depends test_navbar_prepend_and_add
  308. * @param $node
  309. */
  310. public function test_navbar_has_items(moodle_page $page) {
  311. $this->resetAfterTest();
  312. $this->assertTrue($page->navbar->has_items());
  313. }
  314. public function test_cache__get() {
  315. $cache = new navigation_cache('unittest_nav');
  316. $cache->anysetvariable = true;
  317. $this->assertTrue($cache->anysetvariable);
  318. $this->assertEquals($cache->notasetvariable, null);
  319. }
  320. public function test_cache__set() {
  321. $cache = new navigation_cache('unittest_nav');
  322. $cache->anysetvariable = true;
  323. $cache->myname = 'Sam Hemelryk';
  324. $this->assertTrue($cache->cached('myname'));
  325. $this->assertSame('Sam Hemelryk', $cache->myname);
  326. }
  327. public function test_cache_cached() {
  328. $cache = new navigation_cache('unittest_nav');
  329. $cache->anysetvariable = true;
  330. $this->assertTrue($cache->cached('anysetvariable'));
  331. $this->assertFalse($cache->cached('notasetvariable'));
  332. }
  333. public function test_cache_clear() {
  334. $cache = new navigation_cache('unittest_nav');
  335. $cache->anysetvariable = true;
  336. $cache = clone($cache);
  337. $this->assertTrue($cache->cached('anysetvariable'));
  338. $cache->clear();
  339. $this->assertFalse($cache->cached('anysetvariable'));
  340. }
  341. public function test_cache_set() {
  342. $cache = new navigation_cache('unittest_nav');
  343. $cache->anysetvariable = true;
  344. $cache->set('software', 'Moodle');
  345. $this->assertTrue($cache->cached('software'));
  346. $this->assertEquals($cache->software, 'Moodle');
  347. }
  348. public function test_setting___construct() {
  349. global $PAGE, $SITE;
  350. $this->resetAfterTest(false);
  351. $PAGE->set_url('/');
  352. $PAGE->set_course($SITE);
  353. $node = new exposed_settings_navigation();
  354. return $node;
  355. }
  356. /**
  357. * @depends test_setting___construct
  358. * @param mixed $node
  359. * @return mixed
  360. */
  361. public function test_setting__initialise($node) {
  362. $this->resetAfterTest(false);
  363. $node->initialise();
  364. $this->assertEquals($node->id, 'settingsnav');
  365. return $node;
  366. }
  367. /**
  368. * @depends test_setting__initialise
  369. * @param mixed $node
  370. * @return mixed
  371. */
  372. public function test_setting_in_alternative_role($node) {
  373. $this->resetAfterTest();
  374. $this->assertFalse($node->exposed_in_alternative_role());
  375. }
  376. }
  377. /**
  378. * This is a dummy object that allows us to call protected methods within the
  379. * global navigation class by prefixing the methods with `exposed_`
  380. */
  381. class exposed_global_navigation extends global_navigation {
  382. protected $exposedkey = 'exposed_';
  383. public function __construct(moodle_page $page=null) {
  384. global $PAGE;
  385. if ($page === null) {
  386. $page = $PAGE;
  387. }
  388. parent::__construct($page);
  389. $this->cache = new navigation_cache('unittest_nav');
  390. }
  391. public function __call($method, $arguments) {
  392. if (strpos($method, $this->exposedkey) !== false) {
  393. $method = substr($method, strlen($this->exposedkey));
  394. }
  395. if (method_exists($this, $method)) {
  396. return call_user_func_array(array($this, $method), $arguments);
  397. }
  398. throw new coding_exception('You have attempted to access a method that does not exist for the given object '.$method, DEBUG_DEVELOPER);
  399. }
  400. public function set_initialised() {
  401. $this->initialised = true;
  402. }
  403. }
  404. class mock_initialise_global_navigation extends global_navigation {
  405. protected static $count = 1;
  406. public function load_for_category() {
  407. $this->add('load_for_category', null, null, null, 'initcall'.self::$count);
  408. self::$count++;
  409. return 0;
  410. }
  411. public function load_for_course() {
  412. $this->add('load_for_course', null, null, null, 'initcall'.self::$count);
  413. self::$count++;
  414. return 0;
  415. }
  416. public function load_for_activity() {
  417. $this->add('load_for_activity', null, null, null, 'initcall'.self::$count);
  418. self::$count++;
  419. return 0;
  420. }
  421. public function load_for_user($user=null, $forceforcontext=false) {
  422. $this->add('load_for_user', null, null, null, 'initcall'.self::$count);
  423. self::$count++;
  424. return 0;
  425. }
  426. }
  427. /**
  428. * This is a dummy object that allows us to call protected methods within the
  429. * global navigation class by prefixing the methods with `exposed_`.
  430. */
  431. class exposed_navbar extends navbar {
  432. protected $exposedkey = 'exposed_';
  433. public function __construct(moodle_page $page) {
  434. parent::__construct($page);
  435. $this->cache = new navigation_cache('unittest_nav');
  436. }
  437. public function __call($method, $arguments) {
  438. if (strpos($method, $this->exposedkey) !== false) {
  439. $method = substr($method, strlen($this->exposedkey));
  440. }
  441. if (method_exists($this, $method)) {
  442. return call_user_func_array(array($this, $method), $arguments);
  443. }
  444. throw new coding_exception('You have attempted to access a method that does not exist for the given object '.$method, DEBUG_DEVELOPER);
  445. }
  446. }
  447. class navigation_exposed_moodle_page extends moodle_page {
  448. public function set_navigation(navigation_node $node) {
  449. $this->_navigation = $node;
  450. }
  451. }
  452. /**
  453. * This is a dummy object that allows us to call protected methods within the
  454. * global navigation class by prefixing the methods with `exposed_`.
  455. */
  456. class exposed_settings_navigation extends settings_navigation {
  457. protected $exposedkey = 'exposed_';
  458. public function __construct() {
  459. global $PAGE;
  460. parent::__construct($PAGE);
  461. $this->cache = new navigation_cache('unittest_nav');
  462. }
  463. public function __call($method, $arguments) {
  464. if (strpos($method, $this->exposedkey) !== false) {
  465. $method = substr($method, strlen($this->exposedkey));
  466. }
  467. if (method_exists($this, $method)) {
  468. return call_user_func_array(array($this, $method), $arguments);
  469. }
  470. throw new coding_exception('You have attempted to access a method that does not exist for the given object '.$method, DEBUG_DEVELOPER);
  471. }
  472. }