callbacks.php 429 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. * @group hooks
  4. */
  5. class Tests_Actions_Callbacks extends WP_UnitTestCase {
  6. /**
  7. * @ticket 23265
  8. */
  9. function test_callback_representations() {
  10. $tag = __FUNCTION__;
  11. $this->assertFalse( has_action( $tag ) );
  12. add_action( $tag, array( 'Class', 'method' ) );
  13. $this->assertEquals( 10, has_action( $tag, array( 'Class', 'method' ) ) );
  14. $this->assertEquals( 10, has_action( $tag, 'Class::method' ) );
  15. }
  16. }