Changeset View
Changeset View
Standalone View
Standalone View
src/parser/__tests__/PhutilTypeSpecTestCase.php
<?php | <?php | ||||
final class PhutilTypeSpecTestCase extends PhutilTestCase { | final class PhutilTypeSpecTestCase extends PhutilTestCase { | ||||
public function testTypeSpecParse() { | public function testTypeSpecParse() { | ||||
$good = array( | $good = array( | ||||
'int', | 'int', | ||||
'int|null', | 'int|null', | ||||
'string', | 'string', | ||||
'SomeClass', | 'SomeClass', | ||||
'Namespace\SomeClass', | |||||
'map<string, string>', | 'map<string, string>', | ||||
'int | null', | 'int | null', | ||||
'list < string >', | 'list < string >', | ||||
'int (must be even)', | 'int (must be even)', | ||||
'optional int', | 'optional int', | ||||
'int?', | 'int?', | ||||
'int|null?', | 'int|null?', | ||||
'optional int? (minimum 300)', | 'optional int? (minimum 300)', | ||||
▲ Show 20 Lines • Show All 294 Lines • Show Last 20 Lines |