Skip to content

Commit

Permalink
Add test for render required property
Browse files Browse the repository at this point in the history
  • Loading branch information
frozzare committed Feb 9, 2016
1 parent f811cd0 commit 222044e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/cases/lib/core/property-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,17 @@ public function test_papi_render_property() {
wp_set_current_user( 0 );
}

public function test_papi_render_required_property() {
$property = papi_property( [
'slug' => 'required_name',
'type' => 'string',
'title' => 'Name',
'required' => true
] );
papi_render_property( $property );
$this->expectOutputRegex( '/class\=\"papi\-rq\"/' );
}

public function test_papi_render_properties() {
$tab = papi_tab( 'Content', [] );
papi_render_properties( [ $tab ] );
Expand Down

0 comments on commit 222044e

Please sign in to comment.