diff --git a/test/testUtils/mocks/mocksContainer/mockText.ts b/test/testUtils/mocks/mocksContainer/mockText.ts index 552f8ff3ff8..1f3f0ad792f 100644 --- a/test/testUtils/mocks/mocksContainer/mockText.ts +++ b/test/testUtils/mocks/mocksContainer/mockText.ts @@ -308,5 +308,14 @@ export default class MockText implements MockGameObject { return this.list; } + /** + * Runs the word wrap algorithm on the text, then returns an array of the lines + */ + getWrappedText() { + // Returns the wrapped text. + // return this.phaserText.getWrappedText(); + return this.runWordWrap(this.text).split("\n"); + } + on(_event: string | symbol, _fn: Function, _context?: any) {} }