コード例 #1
0
 /**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     $this->app->singleton('livedocx.livedocx', function () {
         $client = new Client(new SoapClient(config('livedocx.wsdl')));
         $client->connect(config('livedocx.username'), config('livedocx.password'));
         return new Livedocx($client, new Container(), true);
     });
 }
コード例 #2
0
ファイル: Client.php プロジェクト: awakenweb/livedocx
 public function test_backendListArrayToMultiAssocArray_return_array_when_only_one_String_value()
 {
     $mock = $this->scaffoldMock();
     $client = new LdxClient($mock);
     $test = new stdClass();
     $test->ArrayOfString = [['testValue', date(DATE_RFC1123, 1), (string) 123456, date(DATE_RFC1123, 1)]];
     $returnValue = $client->backendListArrayToMultiAssocArray($test);
     $this->array($returnValue)->size->isEqualTo(1);
     $this->array($returnValue[0])->hasKeys(['filename', 'fileSize', 'createTime', 'modifyTime'])->containsValues(['testValue', 1, 123456]);
 }