/** @test */ public function controller_name_calls_controller_method() { $routeMock = Mockery::mock(Route::class); $routeMock->shouldReceive('controller')->once()->with('foo', 'bar', 'baz')->andReturn('bat'); App::shouldReceive('make')->once()->with(Route::class)->andReturn($routeMock); $result = controller_name('foo', 'bar', 'baz'); $this->assertEquals('bat', $result); }
define('TXP_UPDATE', 1); include txpath . '/update/_update.php'; } load_elements($event); register_element_tabs(); if (!empty($admin_side_plugins) and gps('event') != 'plugin') { load_plugins(1); } include txpath . '/lib/txplib_head.php'; // ugly hack, for the people that don't update their admin_config.php // Get rid of this when we completely remove admin_config and move privs to db if ($event == 'list') { require_privs('article'); } else { require_privs($event); } callback_event($event, $step, 1); // let elements override older /include/txp_foo.php admin pages if (!controller_name($event)) { $inc = txpath . '/include/txp_' . $event . '.php'; if (is_readable($inc)) { include $inc; } } callback_event($event, $step, 0); $microdiff = getmicrotime() - $microstart; echo n . comment(gTxt('runtime') . ': ' . substr($microdiff, 0, 6)); end_page(); } else { txp_die('DB-Connect was succesful, but the textpattern-table was not found.', '503 Service Unavailable'); }