PluginProbe
Edit Flow / 0.9
Edit Flow v0.9
0.11.1 0.11.0 0.7.2 0.7.3 0.7.4 0.7.5 0.7.6 0.8 0.8.1 0.8.2 0.9 0.9.1 0.9.2 0.9.3 0.9.4 0.9.5 0.9.6 0.9.7 0.9.8 0.9.9 trunk 0.1.5 0.10.0 0.10.1 0.10.2 All 44 releases
edit-flow / tests / test-edit-flow-starter.php

test-edit-flow-starter.php in Edit Flow 0.9, at tests/test-edit-flow-starter.php

52 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Tests to test that that testing framework is testing tests. Meta, huh?
4 * @package wordpress-plugins-tests
5 * @author mbijon
6 */
7 class WP_Test_Edit_Flow_Starter_Tests extends WP_UnitTestCase {
8
9 /**
10 * Run a simple test to ensure that the tests are running
11 */
12 function test_editflow_exists() {
13
14 $this->assertTrue( class_exists( 'edit_flow' ) );
15
16 }
17
18 /**
19 * Verify a minimum version of WordPress is installed
20 */
21 function test_wp_version() {
22
23 $minimum_version = '3.4.0';
24 $running_version = get_bloginfo( 'version' );
25
26 //trunk is always "master" in github terms, but WordPress has a specific way of describing it
27 //grab the exact version number to verify that we're on trunk
28 if ( $running_version == 'master' || $running_version == 'trunk' ) {
29 $file = file_get_contents( 'https://raw.github.com/WordPress/WordPress/master/wp-includes/version.php' );
30 preg_match( '#\$wp_version = \'([^\']+)\';#', $file, $matches );
31 $running_version = $matches[1];
32 }
33
34 $this->assertTrue( version_compare( $running_version, $minimum_version, '>=' ) );
35
36 }
37
38 /**
39 * Test modules loading
40 */
41 function test_editflow_register_module() {
42
43 $EditFlow = EditFlow();
44
45 $module_real = strtolower( 'calendar' );
46 $module_args = array ( 'title' => $module_real );
47 $module_return = $EditFlow->register_module( $module_real, $module_args );
48 $this->assertTrue( $module_real == $module_return->name );
49
50 }
51
52 }