| Total Complexity | 5 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | final class HasTaxonQueryBuilderSpec extends ObjectBehavior |
||
| 21 | { |
||
| 22 | function let(): void |
||
| 23 | { |
||
| 24 | $this->beConstructedWith('taxons_property'); |
||
| 25 | } |
||
| 26 | |||
| 27 | function it_is_initializable(): void |
||
| 28 | { |
||
| 29 | $this->shouldHaveType(HasTaxonQueryBuilder::class); |
||
| 30 | } |
||
| 31 | |||
| 32 | function it_implements_query_builder_interface(): void |
||
| 33 | { |
||
| 34 | $this->shouldHaveType(QueryBuilderInterface::class); |
||
| 35 | } |
||
| 36 | |||
| 37 | function it_builds_query(): void |
||
| 38 | { |
||
| 39 | $this->buildQuery([ |
||
| 40 | 'taxons_property' => 'book', |
||
| 41 | ])->shouldBeAnInstanceOf(Terms::class); |
||
| 42 | } |
||
| 43 | |||
| 44 | function it_builds_returned_null_if_property_is_null(): void |
||
| 45 | { |
||
| 46 | $this->buildQuery(['taxons_property' => null])->shouldBeEqualTo(null); |
||
| 47 | } |
||
| 49 |