public function testConfig()
 {
     $config = (include $this->root . '/config/config.php');
     $app = $this->getApplication();
     $provider = new ReactRenderServerServiceProvider($app);
     $provider->register();
     $this->assertTrue($config === $app['config']->get('react-render-server'));
 }
예제 #2
0
 protected function bootApplication()
 {
     $app = $this->getApplication();
     $provider = new ReactRenderServerServiceProvider($app);
     $provider->register();
     $provider->boot();
     ReactRenderServer::setFacadeApplication($app);
     return $app;
 }
예제 #3
0
 public function testComponent()
 {
     $app = $this->getApplication();
     $provider = new ReactRenderServerServiceProvider($app);
     $provider->register();
     $app['config']->set('react-render-server.host', __DIR__ . '/data/');
     $app['config']->set('react-render-server.port', null);
     $rrs = $app->make(ReactRenderServer::class);
     $this->assertEquals($rrs->component('Test'), 'Test');
 }