@@ 33-46 (lines=14) @@ | ||
30 | /** |
|
31 | * @see WP_Customize_Panel::__construct() |
|
32 | */ |
|
33 | function test_construct_default_args() { |
|
34 | $panel = new WP_Customize_Panel( $this->manager, 'foo' ); |
|
35 | $this->assertInternalType( 'int', $panel->instance_number ); |
|
36 | $this->assertEquals( $this->manager, $panel->manager ); |
|
37 | $this->assertEquals( 'foo', $panel->id ); |
|
38 | $this->assertEquals( 160, $panel->priority ); |
|
39 | $this->assertEquals( 'edit_theme_options', $panel->capability ); |
|
40 | $this->assertEquals( '', $panel->theme_supports ); |
|
41 | $this->assertEquals( '', $panel->title ); |
|
42 | $this->assertEquals( '', $panel->description ); |
|
43 | $this->assertEmpty( $panel->sections ); |
|
44 | $this->assertEquals( 'default', $panel->type ); |
|
45 | $this->assertEquals( array( $panel, 'active_callback' ), $panel->active_callback ); |
|
46 | } |
|
47 | ||
48 | /** |
|
49 | * @see WP_Customize_Panel::__construct() |
@@ 33-46 (lines=14) @@ | ||
30 | /** |
|
31 | * @see WP_Customize_Section::__construct() |
|
32 | */ |
|
33 | function test_construct_default_args() { |
|
34 | $section = new WP_Customize_Section( $this->manager, 'foo' ); |
|
35 | $this->assertInternalType( 'int', $section->instance_number ); |
|
36 | $this->assertEquals( $this->manager, $section->manager ); |
|
37 | $this->assertEquals( 'foo', $section->id ); |
|
38 | $this->assertEquals( 160, $section->priority ); |
|
39 | $this->assertEquals( 'edit_theme_options', $section->capability ); |
|
40 | $this->assertEquals( '', $section->theme_supports ); |
|
41 | $this->assertEquals( '', $section->title ); |
|
42 | $this->assertEquals( '', $section->description ); |
|
43 | $this->assertEmpty( $section->panel ); |
|
44 | $this->assertEquals( 'default', $section->type ); |
|
45 | $this->assertEquals( array( $section, 'active_callback' ), $section->active_callback ); |
|
46 | } |
|
47 | ||
48 | /** |
|
49 | * @see WP_Customize_Section::__construct() |