You appear to be a bot. Output may be restricted
Description
Test constructor.
Mainly validates that the correct hooks exist. Also checks for the post type and the Setting Type.
Usage
Test_WP_Customize_Custom_CSS_Setting::test_construct();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/customize/custom-css-setting.php
Lines:
1 to 25 of 25
public function test_construct() { $this->assertTrue( post_type_exists( 'custom_css' ) ); $this->assertSame( 'custom_css', $this->setting->type ); $this->assertSame( get_stylesheet(), $this->setting->stylesheet ); $this->assertSame( 'edit_css', $this->setting->capability ); $exception = null; try { $x = new WP_Customize_Custom_CSS_Setting( $this->wp_customize, 'bad' ); unset( $x ); } catch ( Exception $e ) { $exception = $e; } $this->assertInstanceOf( 'Exception', $exception ); $exception = null; try { $x = new WP_Customize_Custom_CSS_Setting( $this->wp_customize, 'custom_css' ); unset( $x ); } catch ( Exception $e ) { $exception = $e; } $this->assertInstanceOf( 'Exception', $exception ); }