[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/tests/phpunit/testcases/core/functions/ -> bpCoreGetDirectoryPageId.php (source)

   1  <?php
   2  
   3  /**
   4   * @group core
   5   * @group BP7025
   6   */
   7  class BP_Tests_Core_BpCoreGetDirectoryPageId extends BP_UnitTestCase {
   8  	public function test_should_fall_back_on_current_component() {
   9          $this->go_to( bp_get_activity_directory_permalink() );
  10  
  11          $found = bp_core_get_directory_page_id();
  12  
  13          $pages = bp_core_get_directory_page_ids();
  14          $this->assertSame( $pages['activity'], $found );
  15      }
  16  
  17  	public function test_should_accept_component_override() {
  18          $this->go_to( bp_get_activity_directory_permalink() );
  19  
  20          $found = bp_core_get_directory_page_id( 'members' );
  21  
  22          $pages = bp_core_get_directory_page_ids();
  23          $this->assertSame( $pages['members'], $found );
  24      }
  25  
  26      public function test_should_return_false_for_invalid_component() {
  27          $found = bp_core_get_directory_page_id( 'foo' );
  28  
  29          $pages = bp_core_get_directory_page_ids();
  30          $this->assertFalse( $found );
  31      }
  32  }


Generated: Sat Jun 6 01:01:27 2020 Cross-referenced by PHPXref 0.7.1