Completed
Push — master ( 0e25a2...ed48d3 )
by Daniel
02:15
created

JobTest::testGetSnippet()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Jobles\Tests\Core\Job;
4
5
use Jobles\Core\Job\Job;
6
7
class JobTest extends \PHPUnit_Framework_TestCase
8
{
9
    /**
10
     * @var Job
11
     */
12
    private $job;
13
14
    public function setUp()
15
    {
16
        $this->job = new Job;
17
        $this->job->setKey('job_key');
18
        $this->job->setTitle('Analista de Sistema para Software de RH');
19
        $this->job->setDate(new \DateTime('Sat, 13 Feb 2016 08:59:39 GMT'));
20
        $this->job->setSnippet('Principais atribuições do cargo...');
21
        $this->job->setViewUrl('http://job.url/pt-br/job-12345');
22
        $this->job->setSource('www.ceviu.com.br');
23
        $this->job->setCompany('Mega Enterprise, Co');
24
        $this->job->setSalaryCurrencyCode('BRL');
25
        $this->job->setSalaryMin(1000);
26
        $this->job->setSalaryMax(2000);
27
        $this->job->setCity('Sao Paulo');
28
        $this->job->setState('SP');
29
        $this->job->setCountry('Brasil');
30
    }
31
32
    public function testGetKey()
33
    {
34
        $this->assertEquals('job_key', $this->job->getKey());
35
    }
36
37
    public function testGetTitle()
38
    {
39
        $this->assertEquals('Analista de Sistema para Software de RH', $this->job->getTitle());
40
    }
41
42
    public function testGetDate()
43
    {
44
        $this->assertEquals('2016-02-13 08:59:39', $this->job->getDate()->format('Y-m-d H:i:s'));
45
    }
46
47
    public function testGetSnippet()
48
    {
49
        $this->assertEquals('Principais atribuições do cargo...', $this->job->getSnippet());
50
    }
51
52
    public function testGetViewUrl()
53
    {
54
        $this->assertEquals('http://job.url/pt-br/job-12345', $this->job->getViewUrl());
55
    }
56
57
    public function testGetSource()
58
    {
59
        $this->assertEquals('www.ceviu.com.br', $this->job->getSource());
60
    }
61
62
    public function testGetCompany()
63
    {
64
        $this->assertEquals('Mega Enterprise, Co', $this->job->getCompany());
65
    }
66
67
    public function testGetSalaryCurrencyCode()
68
    {
69
        $this->assertEquals('BRL', $this->job->getSalaryCurrencyCode());
70
    }
71
72
    public function testGetSalaryMin()
73
    {
74
        $this->assertEquals(1000, $this->job->getSalaryMin());
75
    }
76
77
    public function testGetSalaryMax()
78
    {
79
        $this->assertEquals(2000, $this->job->getSalaryMax());
80
    }
81
82
    public function testGetCity()
83
    {
84
        $this->assertEquals('Sao Paulo', $this->job->getCity());
85
    }
86
87
    public function testGetState()
88
    {
89
        $this->assertEquals('SP', $this->job->getState());
90
    }
91
92
    public function testGetCountry()
93
    {
94
        $this->assertEquals('Brasil', $this->job->getCountry());
95
    }
96
}
97