<?php
namespace nur\ldap\syntaxes;

use nur\t\TestCase;

class TelephoneSyntaxTest extends TestCase {
  function testPhp2ldap(): void {
    $syn = new TelephoneSyntax();
    self::assertNull($syn->php2ldap(null));
    self::assertNull($syn->php2ldap(''));
    self::assertSame('+262 262 30 65 00', $syn->php2ldap('306500'));
    self::assertSame('+262 262 30 65 00', $syn->php2ldap('0262306500'));
    self::assertSame('+262 692 29 58 24', $syn->php2ldap('0692295824'));
    self::assertSame('+33 156 12 34 56', $syn->php2ldap('0156123456'));
  }
}