|
@@ 36-43 (lines=8) @@
|
| 33 |
|
$this->transform($qb, $context)->shouldReturn('TRIM(a.foo)'); |
| 34 |
|
} |
| 35 |
|
|
| 36 |
|
public function it_should_transform_leading(QueryBuilder $qb): void |
| 37 |
|
{ |
| 38 |
|
$this->beConstructedWith('foo', Trim::LEADING); |
| 39 |
|
|
| 40 |
|
$context = 'a'; |
| 41 |
|
|
| 42 |
|
$this->transform($qb, $context)->shouldReturn('TRIM(LEADING FROM a.foo)'); |
| 43 |
|
} |
| 44 |
|
|
| 45 |
|
public function it_should_transform_trailing(QueryBuilder $qb): void |
| 46 |
|
{ |
|
@@ 45-52 (lines=8) @@
|
| 42 |
|
$this->transform($qb, $context)->shouldReturn('TRIM(LEADING FROM a.foo)'); |
| 43 |
|
} |
| 44 |
|
|
| 45 |
|
public function it_should_transform_trailing(QueryBuilder $qb): void |
| 46 |
|
{ |
| 47 |
|
$this->beConstructedWith('foo', Trim::TRAILING); |
| 48 |
|
|
| 49 |
|
$context = 'a'; |
| 50 |
|
|
| 51 |
|
$this->transform($qb, $context)->shouldReturn('TRIM(TRAILING FROM a.foo)'); |
| 52 |
|
} |
| 53 |
|
|
| 54 |
|
public function it_should_transform_both(QueryBuilder $qb): void |
| 55 |
|
{ |
|
@@ 54-61 (lines=8) @@
|
| 51 |
|
$this->transform($qb, $context)->shouldReturn('TRIM(TRAILING FROM a.foo)'); |
| 52 |
|
} |
| 53 |
|
|
| 54 |
|
public function it_should_transform_both(QueryBuilder $qb): void |
| 55 |
|
{ |
| 56 |
|
$this->beConstructedWith('foo', Trim::BOTH); |
| 57 |
|
|
| 58 |
|
$context = 'a'; |
| 59 |
|
|
| 60 |
|
$this->transform($qb, $context)->shouldReturn('TRIM(BOTH FROM a.foo)'); |
| 61 |
|
} |
| 62 |
|
|
| 63 |
|
public function it_should_transform_with_characters(QueryBuilder $qb): void |
| 64 |
|
{ |
|
@@ 63-70 (lines=8) @@
|
| 60 |
|
$this->transform($qb, $context)->shouldReturn('TRIM(BOTH FROM a.foo)'); |
| 61 |
|
} |
| 62 |
|
|
| 63 |
|
public function it_should_transform_with_characters(QueryBuilder $qb): void |
| 64 |
|
{ |
| 65 |
|
$this->beConstructedWith('foo', '', 's'); |
| 66 |
|
|
| 67 |
|
$context = 'a'; |
| 68 |
|
|
| 69 |
|
$this->transform($qb, $context)->shouldReturn('TRIM(\'s\' FROM a.foo)'); |
| 70 |
|
} |
| 71 |
|
|
| 72 |
|
public function it_should_transform_leading_with_characters(QueryBuilder $qb): void |
| 73 |
|
{ |
|
@@ 72-79 (lines=8) @@
|
| 69 |
|
$this->transform($qb, $context)->shouldReturn('TRIM(\'s\' FROM a.foo)'); |
| 70 |
|
} |
| 71 |
|
|
| 72 |
|
public function it_should_transform_leading_with_characters(QueryBuilder $qb): void |
| 73 |
|
{ |
| 74 |
|
$this->beConstructedWith('foo', Trim::LEADING, 's'); |
| 75 |
|
|
| 76 |
|
$context = 'a'; |
| 77 |
|
|
| 78 |
|
$this->transform($qb, $context)->shouldReturn('TRIM(LEADING \'s\' FROM a.foo)'); |
| 79 |
|
} |
| 80 |
|
|
| 81 |
|
public function it_should_transform_trailing_with_characters(QueryBuilder $qb): void |
| 82 |
|
{ |
|
@@ 81-88 (lines=8) @@
|
| 78 |
|
$this->transform($qb, $context)->shouldReturn('TRIM(LEADING \'s\' FROM a.foo)'); |
| 79 |
|
} |
| 80 |
|
|
| 81 |
|
public function it_should_transform_trailing_with_characters(QueryBuilder $qb): void |
| 82 |
|
{ |
| 83 |
|
$this->beConstructedWith('foo', Trim::TRAILING, 's'); |
| 84 |
|
|
| 85 |
|
$context = 'a'; |
| 86 |
|
|
| 87 |
|
$this->transform($qb, $context)->shouldReturn('TRIM(TRAILING \'s\' FROM a.foo)'); |
| 88 |
|
} |
| 89 |
|
|
| 90 |
|
public function it_should_transform_both_with_characters(QueryBuilder $qb): void |
| 91 |
|
{ |
|
@@ 90-97 (lines=8) @@
|
| 87 |
|
$this->transform($qb, $context)->shouldReturn('TRIM(TRAILING \'s\' FROM a.foo)'); |
| 88 |
|
} |
| 89 |
|
|
| 90 |
|
public function it_should_transform_both_with_characters(QueryBuilder $qb): void |
| 91 |
|
{ |
| 92 |
|
$this->beConstructedWith('foo', Trim::BOTH, 's'); |
| 93 |
|
|
| 94 |
|
$context = 'a'; |
| 95 |
|
|
| 96 |
|
$this->transform($qb, $context)->shouldReturn('TRIM(BOTH \'s\' FROM a.foo)'); |
| 97 |
|
} |
| 98 |
|
|
| 99 |
|
public function it_should_execute(): void |
| 100 |
|
{ |