Changeset View
Changeset View
Standalone View
Standalone View
src/unit/ArcanistUnitTestResult.php
Show All 24 Lines | public function setNamespace($namespace) { | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getNamespace() { | public function getNamespace() { | ||||
return $this->namespace; | return $this->namespace; | ||||
} | } | ||||
public function setName($name) { | public function setName($name) { | ||||
$maximum_bytes = 255; | |||||
$actual_bytes = strlen($name); | |||||
if ($actual_bytes > $maximum_bytes) { | |||||
throw new Exception( | |||||
pht( | |||||
'Parameter ("%s") passed to "%s" when constructing a unit test '. | |||||
'message must be a string with a maximum length of %s bytes, but '. | |||||
'is %s bytes in length.', | |||||
$name, | |||||
'setName()', | |||||
new PhutilNumber($maximum_bytes), | |||||
new PhutilNumber($actual_bytes))); | |||||
} | |||||
$this->name = $name; | $this->name = $name; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getName() { | public function getName() { | ||||
return $this->name; | return $this->name; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 187 Lines • Show Last 20 Lines |