Skip to content

Commit

Permalink
adjust test, fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
koertho committed Mar 18, 2024
1 parent 75de772 commit f0c8ae5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function createInlineAndWhere(): string
*/
public function createInlineOrWhere(): string
{
return '('.$this->field.' REGEXP (\''.implode("\') OR ".$this->field.' REGEXP (\'', $this->getValueList()).'\'))';
return '('.$this->field.' REGEXP (\''.implode('\') OR '.$this->field.' REGEXP (\'', $this->getValueList()).'\'))';
}

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/Util/DatabaseUtil/DatabaseUtilTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public function testCreateWhereForSerializedBlob()
static::assertInstanceOf(CreateWhereForSerializedBlobResult::class, $result);
static::assertSame('(elements REGEXP (?) OR elements REGEXP (?))', $result->createOrWhere());
static::assertSame('(elements REGEXP (?) AND elements REGEXP (?))', $result->createAndWhere());
static::assertSame('(elements REGEXP (:"texts") OR elements REGEXP (:"headline"))', $result->createInlineOrWhere());
static::assertSame('(elements REGEXP (:"texts") AND elements REGEXP (:"headline"))', $result->createInlineAndWhere());
static::assertSame('(elements REGEXP (\':"texts"\') OR elements REGEXP (\':"headline"\'))', $result->createInlineOrWhere());
static::assertSame('(elements REGEXP (\':"texts"\') AND elements REGEXP (\':"headline"\'))', $result->createInlineAndWhere());
static::assertCount(2, $result->values);
}

Expand Down

0 comments on commit f0c8ae5

Please sign in to comment.