Exemplo n.º 1
0
 /**
  * @dataProvider urlForNormalizerProvider
  *
  * @param \Demo\Domain\ValueObjects\Url $url
  * @param $expectedResult
  */
 public function testNormalizeCanNormalizeAsExpected(Url $url, $expectedResult)
 {
     $this->assertEquals($expectedResult, (string) Normalizer::normalize($url));
 }
Exemplo n.º 2
0
 /**
  * UrlParser constructor.
  *
  * @param string $urlString
  *
  * @throws \InvalidArgumentException If argument is not a string.
  */
 public function __construct($urlString)
 {
     TypeChecker::assertString($urlString, '$urlString');
     $this->url = Normalizer::normalize(new Url($urlString));
 }