| @@ 21-61 (lines=41) @@ | ||
| 18 | * |
|
| 19 | * @author Beñat Espiña <[email protected]> |
|
| 20 | */ |
|
| 21 | class CustomPostTypeFieldsSpec extends ObjectBehavior |
|
| 22 | { |
|
| 23 | function let() |
|
| 24 | { |
|
| 25 | $this->beAnInstanceOf('fixtures\LIN3S\WPFoundation\CustomPostTypeFields'); |
|
| 26 | } |
|
| 27 | ||
| 28 | function it_extends_fields() |
|
| 29 | { |
|
| 30 | $this->shouldHaveType('LIN3S\WPFoundation\PostTypes\Fields\CustomPostTypeFields'); |
|
| 31 | $this->shouldHaveType('LIN3S\WPFoundation\PostTypes\Fields\Fields'); |
|
| 32 | } |
|
| 33 | ||
| 34 | function it_implements_fields_interface() |
|
| 35 | { |
|
| 36 | $this->shouldHaveType('LIN3S\WPFoundation\PostTypes\Fields\FieldsInterface'); |
|
| 37 | } |
|
| 38 | ||
| 39 | function it_should_be_components() |
|
| 40 | { |
|
| 41 | $this->components()->shouldBeArray(); |
|
| 42 | } |
|
| 43 | ||
| 44 | function it_should_connector() |
|
| 45 | { |
|
| 46 | $this->connector()->shouldReturn([ |
|
| 47 | [ |
|
| 48 | [ |
|
| 49 | 'param' => 'post_type', |
|
| 50 | 'operator' => '==', |
|
| 51 | 'value' => 'custom_post_type', |
|
| 52 | ], |
|
| 53 | ], |
|
| 54 | ]); |
|
| 55 | } |
|
| 56 | ||
| 57 | function it_should_be_remove_screen_attributes() |
|
| 58 | { |
|
| 59 | $this->removeScreenAttributes(); |
|
| 60 | } |
|
| 61 | } |
|
| 62 | ||
| @@ 21-60 (lines=40) @@ | ||
| 18 | * |
|
| 19 | * @author Beñat Espiña <[email protected]> |
|
| 20 | */ |
|
| 21 | class FieldsSpec extends ObjectBehavior |
|
| 22 | { |
|
| 23 | function let() |
|
| 24 | { |
|
| 25 | $this->beAnInstanceOf('fixtures\LIN3S\WPFoundation\Fields'); |
|
| 26 | } |
|
| 27 | ||
| 28 | function it_extends_fields() |
|
| 29 | { |
|
| 30 | $this->shouldHaveType('LIN3S\WPFoundation\PostTypes\Fields\Fields'); |
|
| 31 | } |
|
| 32 | ||
| 33 | function it_implements_fields_interface() |
|
| 34 | { |
|
| 35 | $this->shouldHaveType('LIN3S\WPFoundation\PostTypes\Fields\FieldsInterface'); |
|
| 36 | } |
|
| 37 | ||
| 38 | function it_should_be_components() |
|
| 39 | { |
|
| 40 | $this->components()->shouldBeArray(); |
|
| 41 | } |
|
| 42 | ||
| 43 | function it_should_connector() |
|
| 44 | { |
|
| 45 | $this->connector()->shouldReturn([ |
|
| 46 | [ |
|
| 47 | [ |
|
| 48 | 'param' => 'post_type', |
|
| 49 | 'operator' => '==', |
|
| 50 | 'value' => 'post', |
|
| 51 | ], |
|
| 52 | ], |
|
| 53 | ]); |
|
| 54 | } |
|
| 55 | ||
| 56 | function it_should_be_remove_screen_attributes() |
|
| 57 | { |
|
| 58 | $this->removeScreenAttributes(); |
|
| 59 | } |
|
| 60 | } |
|
| 61 | ||