From d6df5866a76b26f3d9d752148b583ebaa1054d49 Mon Sep 17 00:00:00 2001 From: Yevgeny Tomenko Date: Mon, 9 Sep 2024 13:04:52 +0300 Subject: [PATCH] fix coding standards --- .../Model/Filter/CriteriaFilterTest.php | 10 ++++---- .../Filter/Criterion/LookupCriterionTest.php | 24 +++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/tests/TestCase/Model/Filter/CriteriaFilterTest.php b/tests/TestCase/Model/Filter/CriteriaFilterTest.php index b27a5d8..dee3d48 100644 --- a/tests/TestCase/Model/Filter/CriteriaFilterTest.php +++ b/tests/TestCase/Model/Filter/CriteriaFilterTest.php @@ -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']); diff --git a/tests/TestCase/Model/Filter/Criterion/LookupCriterionTest.php b/tests/TestCase/Model/Filter/Criterion/LookupCriterionTest.php index 4646dbd..b6e30fa 100644 --- a/tests/TestCase/Model/Filter/Criterion/LookupCriterionTest.php +++ b/tests/TestCase/Model/Filter/Criterion/LookupCriterionTest.php @@ -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']); @@ -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); @@ -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);