public function testIsFieldEqual() { $countries = (include __DIR__ . '/../fixtures/countries.php'); $visas = (include __DIR__ . '/../fixtures/visas.php'); $extraData = ['user' => (new User())->setId(1)->setParentNationality('UK')]; $this->assertFalse($this->comparison->isFieldEqual('main_user.parentNationality', 'FR', $extraData)); $this->assertTrue($this->comparison->isFieldEqual('main_user.parentNationality', 'UK', $extraData)); }
public function testIsFieldEqual() { $countries = (include __DIR__ . '/../fixtures/countries.php'); $visas = (include __DIR__ . '/../fixtures/visas.php'); $extraData = ['resource' => (new Vehicle())->setId(1)->setOwner((new User())->setId(1))]; $this->assertFalse($this->comparison->isFieldEqual('vehicle.owner.id', 2, $extraData)); $this->assertTrue($this->comparison->isFieldEqual('vehicle.owner.id', 1, $extraData)); }