1 | <?php |
||
22 | class OptionSpec extends ObjectBehavior |
||
23 | { |
||
24 | public function let() |
||
25 | { |
||
26 | $this->setCurrentLocale('en_US'); |
||
27 | $this->setFallbackLocale('en_US'); |
||
28 | } |
||
29 | |||
30 | function it_is_initializable() |
||
34 | |||
35 | function it_implement_Sylius_option_interface() |
||
39 | |||
40 | function it_should_not_have_id_by_default() |
||
44 | |||
45 | function it_has_mutable_code() |
||
46 | { |
||
47 | $this->setCode('O1'); |
||
48 | $this->getCode()->shouldReturn('O1'); |
||
49 | } |
||
50 | |||
51 | function it_should_not_have_name_by_default() |
||
55 | |||
56 | function its_name_should_be_mutable() |
||
57 | { |
||
58 | $this->setName('Size'); |
||
59 | $this->getName()->shouldReturn('Size'); |
||
60 | } |
||
61 | |||
62 | function it_returns_name_when_converted_to_string() |
||
67 | |||
68 | function it_should_initialize_values_collection_by_default() |
||
69 | { |
||
72 | |||
73 | function it_should_add_value(OptionValueInterface $value) |
||
80 | |||
81 | function it_should_remove_value(OptionValueInterface $value) |
||
93 | |||
94 | function it_should_initialize_creation_date_by_default() |
||
98 | |||
99 | function it_should_not_have_last_update_date_by_default() |
||
103 | } |
||
104 |