Update ely/php-code-style and run updated CS fixer

This commit is contained in:
ErickSkrauch
2019-02-26 02:26:02 +03:00
parent ea4ebd19ef
commit b20825a051
67 changed files with 250 additions and 252 deletions

View File

@@ -11,18 +11,23 @@ class MinecraftServerAddressValidatorTest extends TestCase {
*/
public function testValidate($address, $shouldBeValid) {
$validator = new MinecraftServerAddressValidator();
$validator->message = 'mock message';
$validator->validate($address, $errors);
$this->assertEquals($shouldBeValid, $errors === null);
if ($shouldBeValid) {
$this->assertNull($errors);
} else {
$this->assertSame('mock message', $errors);
}
}
public function domainNames() {
return [
['localhost', true ],
['localhost:25565', true ],
['mc.hypixel.net', true ],
['mc.hypixel.net:25565', true ],
['136.243.88.97', true ],
['136.243.88.97:25565', true ],
['localhost', true],
['localhost:25565', true],
['mc.hypixel.net', true],
['mc.hypixel.net:25565', true],
['136.243.88.97', true],
['136.243.88.97:25565', true],
['http://ely.by', false],
['http://ely.by:80', false],
['ely.by/abcd', false],