Changeset 905 in tests
- Timestamp:
- 07/18/2012 07:37:03 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpunit.xml
r897 r905 9 9 <testsuite> 10 10 <directory suffix=".php">tests</directory> 11 <file phpVersion="5.3.0">tests/ test_actions_closures.php</file>11 <file phpVersion="5.3.0">tests/actions/closures.php</file> 12 12 </testsuite> 13 13 </testsuites> -
trunk/tests/actions/closures.php
r904 r905 6 6 * @group hooks 7 7 */ 8 class WP_Test_Actions_Closures extends WP_UnitTestCase {8 class Tests_Actions_Closures extends WP_UnitTestCase { 9 9 10 10 /** … … 12 12 */ 13 13 function test_action_closure() { 14 $tag = rand_str();14 $tag = 'test_action_closure'; 15 15 $closure = function($a, $b) { $GLOBALS[$a] = $b;}; 16 16 add_action($tag, $closure, 10, 2); … … 23 23 $this->assertSame($GLOBALS[$context[0]], $context[1]); 24 24 25 $tag2 = rand_str();25 $tag2 = 'test_action_closure_2'; 26 26 $closure2 = function() { $GLOBALS['closure_no_args'] = true;}; 27 27 add_action($tag2, $closure2); … … 32 32 33 33 $this->assertTrue($GLOBALS['closure_no_args']); 34 35 remove_action( $tag, $closure ); 36 remove_action( $tag2, $closure2 ); 34 37 } 35 38 }
Note: See TracChangeset
for help on using the changeset viewer.