Skip to content

Commit

Permalink
fix coding standards
Browse files Browse the repository at this point in the history
  • Loading branch information
skie committed Sep 9, 2024
1 parent 86af568 commit d6df586
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
10 changes: 5 additions & 5 deletions tests/TestCase/Model/Filter/CriteriaFilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ public function testApplyWithInCriterionAndInnerStringCriterion(): void

$result = $filter->apply($query, $data);

$this->assertMatchesRegularExpression(
'/Articles\.author_id IN \(SELECT Authors\.id AS "?Authors__id"? FROM authors Authors WHERE name LIKE/',
$query->sql()
);
$this->assertMatchesRegularExpression(
'/Articles\.author_id IN \(SELECT Authors\.id AS "?Authors__id"? FROM authors Authors WHERE name LIKE/',
$query->sql()
);

$bindings = $result->getValueBinder()->bindings();
$this->assertCount(1, $bindings);
$this->assertEquals('John%', $bindings[':c0']['value']);
Expand Down
24 changes: 12 additions & 12 deletions tests/TestCase/Model/Filter/Criterion/LookupCriterionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ public function testBuildLikeFilter(): void
$query = $this->Articles->find();
$modifiedQuery = $query->where($result);

$this->assertMatchesRegularExpression(
'/Articles\.author_id IN \(SELECT Authors\.id AS "?Authors__id"? FROM authors Authors WHERE name LIKE/',
$query->sql()
);
$this->assertMatchesRegularExpression(
'/Articles\.author_id IN \(SELECT Authors\.id AS "?Authors__id"? FROM authors Authors WHERE name LIKE/',
$query->sql()
);
$bindings = $modifiedQuery->getValueBinder()->bindings();
$this->assertArrayHasKey(':c0', $bindings);
$this->assertEquals('John%', $bindings[':c0']['value']);
Expand Down Expand Up @@ -165,10 +165,10 @@ public function testBuildQueryByConditionLikeCaseSensitive(): void
$query = $this->Articles->find();
$modifiedQuery = $query->where($result);

$this->assertMatchesRegularExpression(
'/Articles\.author_id IN \(SELECT Authors\.id AS "?Authors__id"? FROM authors Authors WHERE name LIKE/',
$query->sql()
);
$this->assertMatchesRegularExpression(
'/Articles\.author_id IN \(SELECT Authors\.id AS "?Authors__id"? FROM authors Authors WHERE name LIKE/',
$query->sql()
);

$bindings = $modifiedQuery->getValueBinder()->bindings();
$this->assertArrayHasKey(':c0', $bindings);
Expand All @@ -194,10 +194,10 @@ public function testBuildQueryByConditionLikeCaseInsensitive(): void
$query = $this->Articles->find();
$modifiedQuery = $query->where($result);

$this->assertMatchesRegularExpression(
'/Articles\.author_id IN \(SELECT Authors\.id AS "?Authors__id"? FROM authors Authors WHERE name ILIKE/',
$query->sql()
);
$this->assertMatchesRegularExpression(
'/Articles\.author_id IN \(SELECT Authors\.id AS "?Authors__id"? FROM authors Authors WHERE name ILIKE/',
$query->sql()
);

$bindings = $modifiedQuery->getValueBinder()->bindings();
$this->assertArrayHasKey(':c0', $bindings);
Expand Down

0 comments on commit d6df586

Please sign in to comment.