tests: Add end 2 end frontend testing with Cypress (#1403)
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit\Helpers;
|
||||
|
||||
use Tests\TestCase;
|
||||
use App\Helpers\StringHelper;
|
||||
|
||||
class StringHelperTest extends TestCase
|
||||
{
|
||||
public function test_it_builds_a_sql_query()
|
||||
{
|
||||
$array = [
|
||||
'column1',
|
||||
'column2',
|
||||
'column3',
|
||||
];
|
||||
|
||||
$searchTerm = 'term';
|
||||
|
||||
$this->assertEquals(
|
||||
"column1 LIKE '%term%' or column2 LIKE '%term%' or column3 LIKE '%term%'",
|
||||
StringHelper::buildQuery($array, $searchTerm)
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user