Passed
Branch 2.0.0-dev (b7b9ad)
by Jeroen
02:54
created

PropertyTest   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 36
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A testEmptyGender() 0 3 1
A testEmptyEmail() 0 3 1
A testEmptyAddress() 0 3 1
A testEmptyName() 0 3 1
1
<?php
2
3
namespace JeroenDesloovere\Tests\VCard\Property;
4
5
use JeroenDesloovere\VCard\Property\Address;
6
use JeroenDesloovere\VCard\Property\Email;
7
use JeroenDesloovere\VCard\Property\Gender;
8
use JeroenDesloovere\VCard\Property\Name;
9
use PHPUnit\Framework\TestCase;
10
11
/**
12
 * How to execute all tests: `vendor/bin/phpunit tests`
13
 */
14
final class PropertyTest extends TestCase
15
{
16
    /**
17
     * @expectedException \JeroenDesloovere\VCard\Exception\PropertyException
18
     * @expectedExceptionMessage The property you are trying to add is empty.
19
     */
20
    public function testEmptyName(): void
21
    {
22
        new Name();
23
    }
24
25
    /**
26
     * @expectedException \JeroenDesloovere\VCard\Exception\PropertyException
27
     * @expectedExceptionMessage The property you are trying to add is empty.
28
     */
29
    public function testEmptyAddress(): void
30
    {
31
        new Address();
32
    }
33
34
    /**
35
     * @expectedException \JeroenDesloovere\VCard\Exception\PropertyException
36
     * @expectedExceptionMessage The property you are trying to add is empty.
37
     */
38
    public function testEmptyEmail(): void
39
    {
40
        new Email();
41
    }
42
43
    /**
44
     * @expectedException \JeroenDesloovere\VCard\Exception\PropertyException
45
     * @expectedExceptionMessage The property you are trying to add is empty.
46
     */
47
    public function testEmptyGender(): void
48
    {
49
        new Gender();
50
    }
51
}
52