/** * @covers OAuth\UserData\Utils\StringUtils::extractUrls */ public function testExtractUrls() { $string = "Lorem ipsum http://example.com dolor sit http://example2.com amet http://example3.com"; $expected = array('http://example.com', 'http://example2.com', 'http://example3.com'); $actual = StringUtils::extractUrls($string); $this->assertEquals($expected, $actual); }
protected function websitesNormalizer($data) { return isset($data['website']) ? StringUtils::extractUrls($data['website']) : array(); }