Just interested. I have not seen many tutorials or suggestions about WP testbeds. I assume people stick with whatever they are used to in programming.
Here is file I came up with and keep as test.php to quickly throw some code there and see how it works.
Do you use something like this? Know any things worth adding here?PHP Code:<?php
//PHP report errors
error_reporting(E_ALL | E_STRICT);
//WP debug
define('WP_DEBUG', true);
//WP log queries
define('SAVEQUERIES', true);
//WP init
require('wp-blog-header.php');
//WP admin only
if (!current_user_can('administrator')) wp_die('Boo!');
//WP includes
//include_once(ABSPATH.WPINC.'/.php');
include_once(ABSPATH.WPINC.'/print_nice.php');
//code goes here
//WP performance
//echo get_num_queries().' queries in '.timer_stop(0,3).' seconds<br />';
//WP queries
//preprint($wpdb->queries);
//WP cron
//preprint(_get_cron_array());
//WP active plugins
//preprint(get_option('active_plugins'));
//WP hooked functions, from http://www.wprecipes.com/?p=1830
//list_hooked_functions();
//PHP extensions
//preprint(get_loaded_extensions());
//PHP configuration
//phpinfo();
function preprint($array) {echo '<pre>'.print_r($array,true).'</pre>';}
?>


LinkBack URL
About LinkBacks
Reply With Quote
I have two projects going on right now that, while still in sporadic development only when I need new features, provide both a WordPress simulation framework for use with PHPUnit/SimpleTest, and a rich environment for creating test WP data quickly and easily, which, when combined with Selenium, allows for all sorts of easy test automation for both themes and plugins: