Exemplo n.º 1
0
<?php

if (!check_perms('users_mod')) {
    error(404);
}
View::show_header("Tests");
?>
<div class="header">
	<h2>Tests</h2>
	<?php 
TestingView::render_linkbox("classes");
?>
</div>

<div class="thin">
	<?php 
TestingView::render_classes(Testing::get_classes());
?>
</div>

<?php 
View::show_footer();
Exemplo n.º 2
0
<?php

authorize();
if (!check_perms('users_mod')) {
    error(404);
}
$Class = $_POST['class'];
$Method = $_POST['method'];
$Params = json_decode($_POST['params'], true);
if (!empty($Class) && !empty($Method) && Testing::has_testable_method($Class, $Method)) {
    if (count($Params)) {
        $Results = call_user_func_array(array($Class, $Method), array_values($Params));
    } else {
        $Results = call_user_func(array($Class, $Method));
    }
    TestingView::render_results($Results);
}
Exemplo n.º 3
0
<?php

if (!check_perms('users_mod')) {
    error(404);
}
$Class = $_GET['name'];
if (!empty($Class) && !Testing::has_class($Class)) {
    error("Missing class");
}
View::show_header("Tests", "testing");
?>
<div class="header">
	<h2><?php 
echo $Class;
?>
</h2>
	<?php 
echo TestingView::render_linkbox("class");
?>
</div>

<div class="thin">
	<?php 
echo TestingView::render_functions(Testing::get_testable_methods($Class));
?>
</div>

<?php 
View::show_footer();
Exemplo n.º 4
0
<?php

if (!check_perms('users_mod')) {
    error(404);
}
View::show_header("Tests");
?>

<div class="header">
	<h2>Documentation</h2>
	<?php 
TestingView::render_linkbox("comments");
?>
</div>

<div class="thin">
	<?php 
TestingView::render_missing_documentation(Testing::get_classes());
?>
</div>

<?php 
View::show_footer();