Packages

t

play.api.test

StubMessagesFactory

trait StubMessagesFactory extends AnyRef

Source
Helpers.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StubMessagesFactory
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  14. def stubLangs(availables: Seq[Lang] = Seq(Lang.defaultLang)): Langs

    availables

    default as Seq(Lang.defaultLang).

    returns

    a stub Langs

  15. def stubMessages(messagesApi: MessagesApi = stubMessagesApi(), requestHeader: RequestHeader = FakeRequest()): Messages

    Stub method that returns a play.api.i18n.Messages instance.

    Stub method that returns a play.api.i18n.Messages instance.

    messagesApi

    the messagesApi to use, uses stubMessagesApi by default.

    requestHeader

    the request to use, FakeRequest by default.

    returns

    the Messages instance

  16. def stubMessagesApi(messages: Map[String, Map[String, String]] = Map.empty, langs: Langs = stubLangs(), langCookieName: String = "PLAY_LANG", langCookieSecure: Boolean = false, langCookieHttpOnly: Boolean = false, langCookieSameSite: Option[SameSite] = None, httpConfiguration: HttpConfiguration = HttpConfiguration(), langCookieMaxAge: Option[Int] = None): MessagesApi

    Returns a stub DefaultMessagesApi with default values and an empty map.

    Returns a stub DefaultMessagesApi with default values and an empty map.

    messages

    map of languages to map of messages, empty by default.

    langs

    stubLangs() by default

    langCookieName

    "PLAY_LANG" by default

    langCookieSecure

    false by default

    langCookieHttpOnly

    false by default

    langCookieSameSite

    None by default

    httpConfiguration

    configuration, HttpConfiguration() by default.

    langCookieMaxAge

    None by default

    returns

    the messagesApi with minimal configuration.

  17. def stubMessagesRequest(messagesApi: MessagesApi = stubMessagesApi(), request: Request[AnyContentAsEmpty.type] = FakeRequest()): MessagesRequest[AnyContentAsEmpty.type]

    Stub method that returns a play.api.mvc.MessagesRequest instance.

    Stub method that returns a play.api.mvc.MessagesRequest instance.

    messagesApi

    the messagesApi to use, uses stubMessagesApi by default.

    request

    the request to use, FakeRequest by default.

    returns

    the Messages instance

  18. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  19. def toString(): String
    Definition Classes
    AnyRef → Any
  20. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  21. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped