extension = new TranslatorExtension($this->prophesize(Translator::class)->reveal()); } /** * @test */ public function properFunctionsAreReturned() { $engine = $this->prophesize(Engine::class); $engine->registerFunction('translate', Argument::type('callable'))->shouldBeCalledTimes(1); $engine->registerFunction('translate_plural', Argument::type('callable'))->shouldBeCalledTimes(1); $funcs = $this->extension->register($engine->reveal()); } }