form()->text( 'text' )->label( 'Nice label' ); $label = $text->display_label(); $this->assertStringContains( '>Nice label<', $label ); $this->assertStringContains( 'form()->text( 'text' )->label( 'Bold' ); $label = $text->display_label(); $this->assertStringContains( 'assertStringContains( '><b>Bold</b><', $label ); } /** @brief Select options do not have any form of label. **/ public function test_select_labels() { $select = $this->form()->select( 'LabelTest' ); $select->label( 'Select label' ) ->option( 'Option label', 'optionlabel' ); $options = $select->display_input(); $this->assertStringDoesNotContain( '', $options ); } }