feat: multiple hotelcodes assignable to users
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Tests\Entity;
|
||||
|
||||
use App\Entity\User;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class UserTest extends TestCase
|
||||
{
|
||||
public function testHotelCodeMatching(): void
|
||||
{
|
||||
$user = new User();
|
||||
$user->setHotelCodes(['ABC', 'DEF', 'GHI']);
|
||||
|
||||
$isMatch = $user->hasHotelCodeMatch('ABCXXX');
|
||||
$this->assertTrue($isMatch);
|
||||
|
||||
$isMatch = $user->hasHotelCodeMatch('XXXGHI');
|
||||
$this->assertTrue($isMatch);
|
||||
|
||||
$isMatch = $user->hasHotelCodeMatch('XXDEFXX');
|
||||
$this->assertFalse($isMatch);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user