form(); $file = $form->file( 'test_file' ); // Set an accept for all images. $accept = 'image/*'; $file->accept( $accept ); $this->assertEquals( $accept, $file->get_attribute( 'accept' ) ); // Clear the accept. $file->accept(); $this->assertEquals( '', $file->get_attribute( 'accept' ) ); } }