Add in/inArray; expand Field ctr func names
This commit is contained in:
@@ -79,7 +79,8 @@ class ParametersTest extends TestCase
|
||||
|
||||
public function testNameFieldsSucceeds(): void
|
||||
{
|
||||
$named = Parameters::nameFields([Field::EQ('it', 17), Field::EQ('also', 22, ':also'), Field::EQ('other', 24)]);
|
||||
$named = Parameters::nameFields(
|
||||
[Field::equal('it', 17), Field::equal('also', 22, ':also'), Field::equal('other', 24)]);
|
||||
$this->assertCount(3, $named, 'There should be 3 parameters in the array');
|
||||
$this->assertEquals(':field0', $named[0]->paramName, 'Parameter 1 not named correctly');
|
||||
$this->assertEquals(':also', $named[1]->paramName, 'Parameter 2 not named correctly');
|
||||
@@ -89,7 +90,7 @@ class ParametersTest extends TestCase
|
||||
public function testAddFieldsSucceeds(): void
|
||||
{
|
||||
$this->assertEquals([':a' => 1, ':b' => 'two', ':z' => 18],
|
||||
Parameters::addFields([Field::EQ('b', 'two', ':b'), Field::EQ('z', 18, ':z')], [':a' => 1]),
|
||||
Parameters::addFields([Field::equal('b', 'two', ':b'), Field::equal('z', 18, ':z')], [':a' => 1]),
|
||||
'Field parameters not added correctly');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user