File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -440,13 +440,20 @@ public function testLikeCondition(): void
440440
441441 $ t = (clone $ u )->addCondition ('name ' , 'like ' , '%John% ' );
442442 $ this ->assertCount (1 , $ t ->export ());
443+ $ t = (clone $ u )->addCondition ('name ' , 'regexp ' , '^Joh ' );
444+ $ this ->assertCount (1 , $ t ->export ());
443445
444446 $ t = (clone $ u )->addCondition ('name ' , 'like ' , '%john% ' );
445447 $ this ->assertCount (1 , $ t ->export ());
448+ $ t = (clone $ u )->addCondition ('name ' , 'regexp ' , '^joh ' );
449+ $ this ->assertCount (1 , $ t ->export ());
446450
447451 $ t = (clone $ u )->addCondition ('created ' , 'like ' , '%19% ' );
448452 $ this ->assertCount (2 , $ t ->export ()); // only year 2019 records
449453
454+ $ t = (clone $ u )->addCondition ('created ' , 'regexp ' , '19 ' );
455+ $ this ->assertCount (2 , $ t ->export ());
456+
450457 $ t = (clone $ u )->addCondition ('active ' , 'like ' , '%1% ' );
451458 $ this ->assertCount (2 , $ t ->export ()); // only active records
452459
You can’t perform that action at this time.
0 commit comments