wordpress-develop/tests/phpunit/tests/actions/callbacks.php
Andrew Nacin 8045afd81b Move PHPUnit tests into a tests/phpunit directory.
wp-tests-config.php can/should reside in the root of a develop checkout. `phpunit` should be run from the root.

see #25088.


git-svn-id: https://develop.svn.wordpress.org/trunk@25165 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-29 18:39:34 +00:00

23 lines
429 B
PHP

<?php
/**
* @group hooks
*/
class Tests_Actions_Callbacks extends WP_UnitTestCase {
/**
* @ticket 23265
*/
function test_callback_representations() {
$tag = __FUNCTION__;
$this->assertFalse( has_action( $tag ) );
add_action( $tag, array( 'Class', 'method' ) );
$this->assertEquals( 10, has_action( $tag, array( 'Class', 'method' ) ) );
$this->assertEquals( 10, has_action( $tag, 'Class::method' ) );
}
}