|
5 | 5 |
|
6 | 6 | class EmailTest extends TestCase |
7 | 7 | { |
| 8 | + /** |
| 9 | + * @var \SimpleSoftwareIO\QrCode\DataTypes\Email |
| 10 | + */ |
| 11 | + protected $email; |
| 12 | + |
8 | 13 | public function setUp(): void |
9 | 14 | { |
10 | 15 | $this->email = new Email(); |
11 | 16 | } |
12 | 17 |
|
13 | | - public function test_it_generates_the_proper_format_when_only_an_email_address_is_supplied() |
| 18 | + public function test_it_generates_the_proper_format_when_only_an_email_address_is_supplied(): void |
14 | 19 | { |
15 | 20 | $this-> email-> create([ '[email protected]']); |
16 | 21 |
|
17 | 22 | $properFormat = 'mailto:[email protected]'; |
18 | 23 |
|
19 | | - $this->assertEquals($properFormat, strval($this->email)); |
| 24 | + $this->assertEquals($properFormat, \strval($this->email)); |
20 | 25 | } |
21 | 26 |
|
22 | | - public function test_it_generates_the_proper_format_when_an_email_subject_and_body_are_supplied() |
| 27 | + public function test_it_generates_the_proper_format_when_an_email_subject_and_body_are_supplied(): void |
23 | 28 | { |
24 | 29 | $this-> email-> create([ '[email protected]', 'foo', 'bar']); |
25 | 30 |
|
26 | 31 | $properFormat = 'mailto:[email protected]?subject=foo&body=bar'; |
27 | 32 |
|
28 | | - $this->assertEquals($properFormat, strval($this->email)); |
| 33 | + $this->assertEquals($properFormat, \strval($this->email)); |
29 | 34 | } |
30 | 35 |
|
31 | | - public function test_it_generates_the_proper_format_when_an_email_and_subject_are_supplied() |
| 36 | + public function test_it_generates_the_proper_format_when_an_email_and_subject_are_supplied(): void |
32 | 37 | { |
33 | 38 | $this-> email-> create([ '[email protected]', 'foo']); |
34 | 39 |
|
35 | 40 | $properFormat = 'mailto:[email protected]?subject=foo'; |
36 | 41 |
|
37 | | - $this->assertEquals($properFormat, strval($this->email)); |
| 42 | + $this->assertEquals($properFormat, \strval($this->email)); |
38 | 43 | } |
39 | 44 |
|
40 | | - public function test_it_generates_the_proper_format_when_only_a_subject_is_provided() |
| 45 | + public function test_it_generates_the_proper_format_when_only_a_subject_is_provided(): void |
41 | 46 | { |
42 | 47 | $this->email->create([null, 'foo']); |
43 | 48 |
|
44 | 49 | $properFormat = 'mailto:?subject=foo'; |
45 | 50 |
|
46 | | - $this->assertEquals($properFormat, strval($this->email)); |
| 51 | + $this->assertEquals($properFormat, \strval($this->email)); |
47 | 52 | } |
48 | 53 |
|
49 | | - public function test_it_throws_an_exception_when_an_invalid_email_is_given() |
| 54 | + public function test_it_throws_an_exception_when_an_invalid_email_is_given(): void |
50 | 55 | { |
51 | | - $this->expectException(InvalidArgumentException::class); |
| 56 | + $this->expectException(\InvalidArgumentException::class); |
52 | 57 |
|
53 | 58 | $this->email->create(['foo']); |
54 | 59 | } |
|
0 commit comments