mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Compare commits
5 Commits
cdd5a46aeb
...
2b808751a9
Author | SHA1 | Date | |
---|---|---|---|
|
2b808751a9 | ||
|
16cb2702af | ||
|
fe39a2a046 | ||
|
6df8732761 | ||
|
4a6a3d19af |
@ -65,7 +65,13 @@ class DBInt extends DBField
|
|||||||
{
|
{
|
||||||
return sprintf('%d', $this->value);
|
return sprintf('%d', $this->value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function SpelledOut()
|
||||||
|
{
|
||||||
|
$v = $this->prepValueForDB($this->value);
|
||||||
|
return (new NumberFormatter(i18n::get_locale(), NumberFormatter::SPELLOUT))->format($v);
|
||||||
|
}
|
||||||
|
|
||||||
public function scaffoldFormField($title = null, $params = null)
|
public function scaffoldFormField($title = null, $params = null)
|
||||||
{
|
{
|
||||||
return NumericField::create($this->name, $title);
|
return NumericField::create($this->name, $title);
|
||||||
|
@ -43,6 +43,14 @@ class VersionedMemberAuthenticatorTest extends SapphireTest
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Explicity add the Versioned extension to Member, even though it's already in $required_extensions.
|
||||||
|
// This is done to call `unset(self::class::$extra_methods[strtolower($subclass)]);` in
|
||||||
|
// Extensible::add_extension() so when CustomMethods::getExtraMethodConfig() updates the $extra_methods
|
||||||
|
// it will include methods of Versioned such as publishSingle()
|
||||||
|
// This issue will only occur when running subsequent unit test classes in the same process, rather than this
|
||||||
|
// this unit test class in isolation
|
||||||
|
Member::add_extension(Versioned::class);
|
||||||
|
|
||||||
// Enforce dummy validation (this can otherwise be influenced by recipe config)
|
// Enforce dummy validation (this can otherwise be influenced by recipe config)
|
||||||
Deprecation::withSuppressedNotice(
|
Deprecation::withSuppressedNotice(
|
||||||
fn() => PasswordValidator::singleton()
|
fn() => PasswordValidator::singleton()
|
||||||
|
Loading…
Reference in New Issue
Block a user