PSR-2 reformatting PHPDoc corrections
[htmlpurifier.git] / tests / HTMLPurifier / AttrDef / URI / EmailHarness.php
blob35c3f207f3865cf21e1fcdd39322743305c924d5
1 <?php
3 class HTMLPurifier_AttrDef_URI_EmailHarness extends HTMLPurifier_AttrDefHarness
6 /**
7 * Tests common email strings that are obviously pass/fail
8 */
9 public function testCore()
11 $this->assertDef('bob@example.com');
12 $this->assertDef(' bob@example.com ', 'bob@example.com');
13 $this->assertDef('bob.thebuilder@example.net');
14 $this->assertDef('Bob_the_Builder-the-2nd@example.org');
15 $this->assertDef('Bob%20the%20Builder@white-space.test');
17 // extended format, with real name
18 //$this->assertDef('Bob%20Builder%20%3Cbobby.bob.bob@it.is.example.com%3E');
19 //$this->assertDef('Bob Builder <bobby.bob.bob@it.is.example.com>');
21 // time to fail
22 $this->assertDef('bob', false);
23 $this->assertDef('bob@home@work', false);
24 $this->assertDef('@example.com', false);
25 $this->assertDef('bob@', false);
26 $this->assertDef('', false);
32 // vim: et sw=4 sts=4