/**
  * Instantiates TeleporterContainer and register default teleporters
  *
  * @return TeleporterContainer
  */
 public static function load()
 {
     $container = new static();
     $container['stream-teleporter'] = $container->share(function () {
         return StreamTeleporter::create();
     });
     $container['local-teleporter'] = $container->share(function () {
         return LocalTeleporter::create();
     });
     $container['guzzle-teleporter'] = $container->share(function () {
         return GuzzleTeleporter::create();
     });
     return $container;
 }
예제 #2
0
 /**
  * Instantiates TeleporterContainer and register default teleporters
  *
  * @return TeleporterContainer
  */
 public static function load()
 {
     $container = new static();
     $container['stream-teleporter'] = $container->share(function () {
         return StreamTeleporter::create();
     });
     $container['local-teleporter'] = $container->share(function () {
         return LocalTeleporter::create();
     });
     if (class_exists('Guzzle\\Http\\Client')) {
         $container['guzzle-teleporter'] = $container->share(function () {
             return GuzzleTeleporter::create();
         });
     }
     return $container;
 }
 /**
  * @covers Alchemy\Zippy\Resource\Teleporter\GuzzleTeleporter::create
  */
 public function testCreate()
 {
     $this->assertInstanceOf('Alchemy\\Zippy\\Resource\\Teleporter\\GuzzleTeleporter', GuzzleTeleporter::create());
 }