|
@@ 498-505 (lines=8) @@
|
| 495 |
|
$this->assertContains( $expected, $template ); |
| 496 |
|
|
| 497 |
|
$post_types = get_post_types( array( 'show_in_nav_menus' => true ), 'object' ); |
| 498 |
|
if ( $post_types ) { |
| 499 |
|
foreach ( $post_types as $type ) { |
| 500 |
|
$this->assertContains( 'available-menu-items-post_type-' . esc_attr( $type->name ), $template ); |
| 501 |
|
$this->assertRegExp( '#<h4 class="accordion-section-title".*>\s*' . esc_html( $type->labels->singular_name ) . '#', $template ); |
| 502 |
|
$this->assertContains( 'data-type="post_type"', $template ); |
| 503 |
|
$this->assertContains( 'data-object="' . esc_attr( $type->name ) . '"', $template ); |
| 504 |
|
} |
| 505 |
|
} |
| 506 |
|
|
| 507 |
|
$taxonomies = get_taxonomies( array( 'show_in_nav_menus' => true ), 'object' ); |
| 508 |
|
if ( $taxonomies ) { |
|
@@ 508-515 (lines=8) @@
|
| 505 |
|
} |
| 506 |
|
|
| 507 |
|
$taxonomies = get_taxonomies( array( 'show_in_nav_menus' => true ), 'object' ); |
| 508 |
|
if ( $taxonomies ) { |
| 509 |
|
foreach ( $taxonomies as $tax ) { |
| 510 |
|
$this->assertContains( 'available-menu-items-taxonomy-' . esc_attr( $tax->name ), $template ); |
| 511 |
|
$this->assertRegExp( '#<h4 class="accordion-section-title".*>\s*' . esc_html( $tax->labels->singular_name ) . '#', $template ); |
| 512 |
|
$this->assertContains( 'data-type="taxonomy"', $template ); |
| 513 |
|
$this->assertContains( 'data-object="' . esc_attr( $tax->name ) . '"', $template ); |
| 514 |
|
} |
| 515 |
|
} |
| 516 |
|
|
| 517 |
|
$this->assertContains( 'available-menu-items-custom_type', $template ); |
| 518 |
|
$this->assertRegExp( '#<h4 class="accordion-section-title".*>\s*Custom#', $template ); |