|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/* |
|
4
|
|
|
* This file is part of the Sylius package. |
|
5
|
|
|
* |
|
6
|
|
|
* (c) Paweł Jędrzejewski |
|
7
|
|
|
* |
|
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
|
9
|
|
|
* file that was distributed with this source code. |
|
10
|
|
|
*/ |
|
11
|
|
|
|
|
12
|
|
|
namespace spec\Sylius\Bundle\CoreBundle\Sitemap\Model; |
|
13
|
|
|
|
|
14
|
|
|
use PhpSpec\ObjectBehavior; |
|
15
|
|
|
|
|
16
|
|
|
/** |
|
17
|
|
|
* @author Arkadiusz Krakowiak <[email protected]> |
|
18
|
|
|
*/ |
|
19
|
|
|
class ChangeFrequencySpec extends ObjectBehavior |
|
20
|
|
|
{ |
|
21
|
|
|
function it_initialize_with_always_value() |
|
22
|
|
|
{ |
|
23
|
|
|
$this->beConstructedThrough('always'); |
|
24
|
|
|
$this->__toString()->shouldReturn('always'); |
|
25
|
|
|
} |
|
26
|
|
|
|
|
27
|
|
|
function it_initialize_with_hourly_value() |
|
28
|
|
|
{ |
|
29
|
|
|
$this->beConstructedThrough('hourly'); |
|
30
|
|
|
$this->__toString()->shouldReturn('hourly'); |
|
31
|
|
|
} |
|
32
|
|
|
|
|
33
|
|
|
function it_initialize_with_daily_value() |
|
34
|
|
|
{ |
|
35
|
|
|
$this->beConstructedThrough('daily'); |
|
36
|
|
|
$this->__toString()->shouldReturn('daily'); |
|
37
|
|
|
} |
|
38
|
|
|
|
|
39
|
|
|
function it_initialize_with_weekly_value() |
|
40
|
|
|
{ |
|
41
|
|
|
$this->beConstructedThrough('weekly'); |
|
42
|
|
|
$this->__toString()->shouldReturn('weekly'); |
|
43
|
|
|
} |
|
44
|
|
|
|
|
45
|
|
|
function it_initialize_with_monthly_value() |
|
46
|
|
|
{ |
|
47
|
|
|
$this->beConstructedThrough('monthly'); |
|
48
|
|
|
$this->__toString()->shouldReturn('monthly'); |
|
49
|
|
|
} |
|
50
|
|
|
|
|
51
|
|
|
function it_initialize_with_yearly_value() |
|
52
|
|
|
{ |
|
53
|
|
|
$this->beConstructedThrough('yearly'); |
|
54
|
|
|
$this->__toString()->shouldReturn('yearly'); |
|
55
|
|
|
} |
|
56
|
|
|
|
|
57
|
|
|
function it_initialize_with_never_value() |
|
58
|
|
|
{ |
|
59
|
|
|
$this->beConstructedThrough('never'); |
|
60
|
|
|
$this->__toString()->shouldReturn('never'); |
|
61
|
|
|
} |
|
62
|
|
|
} |
|
63
|
|
|
|