Changeset 299 in tests
- Timestamp:
- 05/16/2010 08:07:05 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
wp-testcase/test_actions.php
r292 r299 260 260 261 261 } 262 263 function test_action_closure() { 264 $this->checkAtLeastPHPVersion('5.3'); 265 $this->knownWPBug(10493); 266 267 $tag = rand_str(); 268 $closure = function($a, $b) { $GLOBALS[$a] = $b;}; 269 add_action($tag, $closure, 10, 2); 270 271 $this->assertSame( 10, has_action($tag, $closure) ); 272 273 $context = array( rand_str(), rand_str() ); 274 do_action($tag, $context[0], $context[1]); 275 276 $this->assertSame($GLOBALS[$context[0]], $context[1]); 277 } 278 262 279 } 263 280
Note: See TracChangeset
for help on using the changeset viewer.