Skip to content

Commit

Permalink
Add tests for tel input
Browse files Browse the repository at this point in the history
  • Loading branch information
xemlock committed Aug 18, 2020
1 parent a6b73ee commit ff40bdc
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/HTMLPurifier/HTMLModule/HTML5/Forms/Input/TelTest.php
@@ -0,0 +1,21 @@
<?php

class HTMLPurifier_HTMLModule_HTML5_Forms_Input_TelTest
extends HTMLPurifier_HTMLModule_HTML5_Forms_InputTest
{
public function dataProvider()
{
return array(
'input tel valid' => array(
'<input type="tel" disabled inputmode="tel" maxlength="64" minlength="0" name="phone" pattern="[0-9]{3}-[0-9]{3}-[0-9]{4}" placeholder="Phone" readonly required value="+1202 456 1111" size="10">',
),
'input tel empty value' => array(
'<input type="tel" value="">',
),
'input tel invalid attributes' => array(
'<input type="tel" accept="text/plain" alt="foo" checked dirname="foo.dir" height="10" max="10" min="0" multiple src="foo.png" step="1" width="10">',
'<input type="tel">',
),
);
}
}

0 comments on commit ff40bdc

Please sign in to comment.