'thing' ]; /** @var Lti1p3LaunchRequestFactory|MockObject */ private $launchRequestFactory; /** @var Lti1p3Launcher */ private $subject; public function setUp(): void { $this->launchRequestFactory = $this->createMock(Lti1p3LaunchRequestFactory::class); $this->subject = new Lti1p3Launcher(); $this->subject->setServiceLocator( $this->getServiceLocatorMock( [ Lti1p3LaunchRequestFactory::class => $this->launchRequestFactory ] ) ); } public function testLaunch(): void { $command = $this->createMock(LtiLaunchCommand::class); $launchRequest = new LtiMessage(self::LAUNCH_URL, self::LAUNCH_PARAMS); //FIXME @TODO Use proper class $this->launchRequestFactory ->method('create') ->willReturn($launchRequest); $this->assertEquals( new LtiLaunch(self::LAUNCH_URL, self::LAUNCH_PARAMS), $this->subject->launch($command) ); } }