Skip to content
Permalink
Browse files

refactor: Fixed all remaining failed tests.

  • Loading branch information...
tarlepp committed Jun 9, 2019
1 parent 925fed0 commit 443444faa1442d4f40fa8030457db6efd2dd1f99
@@ -57,8 +57,8 @@ class UserRepositoryTest extends RepositoryTestCase
*/
protected $searchColumns = [
'username',
'firstname',
'surname',
'firstName',
'lastName',
'email',
];
}
@@ -508,8 +508,8 @@ public function testThatUpdateCallsExpectedRepositoryMethod(): void
$methods = [
'setUsername' => 'username',
'setFirstname' => 'firstname',
'setSurname' => 'surname',
'setFirstName' => 'first name',
'setLastName' => 'last name',
'setEmail' => 'test@test.com',
];
@@ -246,39 +246,39 @@ public function dataProviderTestThatProcessSearchTermsWorksLikeExpected(): Gener
// @codingStandardsIgnoreStart
yield [
/** @lang text */
'SELECT entity FROM App\Entity\User entity WHERE entity.username LIKE ?1 AND entity.firstname LIKE ?2 AND entity.surname LIKE ?3 AND entity.email LIKE ?4',
'SELECT entity FROM App\Entity\User entity WHERE entity.username LIKE ?1 AND entity.firstName LIKE ?2 AND entity.lastName LIKE ?3 AND entity.email LIKE ?4',
[
'and' => ['foo'],
],
];
yield [
/** @lang text */
'SELECT entity FROM App\Entity\User entity WHERE entity.username LIKE ?1 OR entity.firstname LIKE ?2 OR entity.surname LIKE ?3 OR entity.email LIKE ?4',
'SELECT entity FROM App\Entity\User entity WHERE entity.username LIKE ?1 OR entity.firstName LIKE ?2 OR entity.lastName LIKE ?3 OR entity.email LIKE ?4',
[
'or' => ['foo'],
],
];
yield [
/** @lang text */
'SELECT entity FROM App\Entity\User entity WHERE entity.username LIKE ?1 AND entity.firstname LIKE ?2 AND entity.surname LIKE ?3 AND entity.email LIKE ?4 AND entity.username LIKE ?5 AND entity.firstname LIKE ?6 AND entity.surname LIKE ?7 AND entity.email LIKE ?8',
'SELECT entity FROM App\Entity\User entity WHERE entity.username LIKE ?1 AND entity.firstName LIKE ?2 AND entity.lastName LIKE ?3 AND entity.email LIKE ?4 AND entity.username LIKE ?5 AND entity.firstName LIKE ?6 AND entity.lastName LIKE ?7 AND entity.email LIKE ?8',
[
'and' => ['foo', 'bar'],
],
];
yield [
/** @lang text */
'SELECT entity FROM App\Entity\User entity WHERE entity.username LIKE ?1 OR entity.firstname LIKE ?2 OR entity.surname LIKE ?3 OR entity.email LIKE ?4 OR entity.username LIKE ?5 OR entity.firstname LIKE ?6 OR entity.surname LIKE ?7 OR entity.email LIKE ?8',
'SELECT entity FROM App\Entity\User entity WHERE entity.username LIKE ?1 OR entity.firstName LIKE ?2 OR entity.lastName LIKE ?3 OR entity.email LIKE ?4 OR entity.username LIKE ?5 OR entity.firstName LIKE ?6 OR entity.lastName LIKE ?7 OR entity.email LIKE ?8',
[
'or' => ['foo', 'bar'],
],
];
yield [
/** @lang text */
'SELECT entity FROM App\Entity\User entity WHERE (entity.username LIKE ?1 AND entity.firstname LIKE ?2 AND entity.surname LIKE ?3 AND entity.email LIKE ?4) AND (entity.username LIKE ?5 OR entity.firstname LIKE ?6 OR entity.surname LIKE ?7 OR entity.email LIKE ?8)',
'SELECT entity FROM App\Entity\User entity WHERE (entity.username LIKE ?1 AND entity.firstName LIKE ?2 AND entity.lastName LIKE ?3 AND entity.email LIKE ?4) AND (entity.username LIKE ?5 OR entity.firstName LIKE ?6 OR entity.lastName LIKE ?7 OR entity.email LIKE ?8)',
[
'and' => ['foo'],
'or' => ['bar'],
@@ -501,17 +501,17 @@ public function dataProviderTestThatGetExpressionCreatesExpectedDqlAndParameters
yield [
[
'and' => [
['u.firstname', 'eq', 'foo bar'],
['u.surname', 'neq', 'bar'],
['u.firstName', 'eq', 'foo bar'],
['u.firstName', 'neq', 'bar'],
],
'or' => [
['u.firstname', 'eq', 'bar foo'],
['u.surname', 'neq', 'foo'],
['u.firstName', 'eq', 'bar foo'],
['u.lastName', 'neq', 'foo'],
],
],
/** @lang text */
<<<'DQL'
SELECT u FROM App\Entity\User u WHERE (u.firstname = ?1 AND u.surname <> ?2) AND (u.firstname = ?3 OR u.surname <> ?4)
SELECT u FROM App\Entity\User u WHERE (u.firstName = ?1 AND u.firstName <> ?2) AND (u.firstName = ?3 OR u.lastName <> ?4)
DQL
,
[

0 comments on commit 443444f

Please sign in to comment.
You can’t perform that action at this time.