elementor()->documents->get_document_types(); $missing_custom_css = []; foreach ( $document_types as $type => $class_name ) { $document = $this->elementor()->documents->create( $type ); // TODO remove this ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ when section will have "custom_css_pro" if ( ! isset( $document->get_controls()['custom_css_pro'] ) && $type !== 'not-supported' && $type !== 'section' ) { array_push( $missing_custom_css, $type ); } } $missing_custom_css = implode( ' | ', $missing_custom_css ); $this->assertEmpty( $missing_custom_css, "in the documents [ $missing_custom_css ] custom_css_pro is missing" ); } }