You are here

public function BrazilianIdsServiceTest::testCleanRg in Brazilian IDs 8

Tests cleaning a RG numbers.

File

tests/src/Unit/BrazilianIdsServiceTest.php, line 33

Class

BrazilianIdsServiceTest
@coversDefaultClass \Drupal\brazilian_ids\BrazilianIdsService @group brazilian_ids

Namespace

Drupal\Tests\brazilian_ids\Unit

Code

public function testCleanRg() {
  $this
    ->assertEquals('275353369', $this->service
    ->clean('27.535.336-9'));
  $this
    ->assertEquals('27535336X', $this->service
    ->clean('27.535.336-X'));
  $this
    ->assertEquals('27535336x', $this->service
    ->clean('27.535.336-x'));
}