Files
carpseeds.pl/wp-content/plugins/elementor-3.2.5-bck4/tests/phpunit/traits/elementor-library-trait.php
2024-07-15 11:28:08 +02:00

20 lines
446 B
PHP

<?php
namespace Elementor\Testing\Traits;
trait Elementor_Library {
/**
* Asserts that a type is registered in documents
*
* @param string $type_name
*/
private function assertDocumentTypeRegistered( $type_name ) {
if ( ! is_string( $type_name ) ) {
throw \PHPUnit_Util_InvalidArgumentHelper::factory(
1,
'only string'
);
}
self::assertNotNull( self::elementor()->documents->get_document_type( $type_name ) );
}
}