You are here

public function DecimalValidatorTest::testIntegerNoParams in Form API Validation 8.2

Testing integer.

File

tests/src/Unit/Validators/DecimalValidatorTest.php, line 41

Class

DecimalValidatorTest
Tests generation of ice cream.

Namespace

Drupal\Tests\fapi_validation\Unit\Validators

Code

public function testIntegerNoParams() {
  $validator = new Validator('decimal', '1525');
  $this
    ->assertTrue($this->plugin
    ->validate($validator, [], $this->decoratedFormState));
  $validator = new Validator('decimal', '-1525');
  $this
    ->assertTrue($this->plugin
    ->validate($validator, [], $this->decoratedFormState));
}