예제 #1
0
 protected function initMuffing()
 {
     League\FactoryMuffin\Facade::define('Tzookb\\TBMsg\\Models\\Eloquent\\Conversation', array('deleted_at' => 'dateTime', 'created_at' => 'dateTime', 'updated_at' => 'dateTime'));
     League\FactoryMuffin\Facade::define('Tzookb\\TBMsg\\Models\\Eloquent\\ConversationUsers', array('conv_id' => 'factory|Tzookb\\TBMsg\\Models\\Eloquent\\Conversation', 'user_id' => 'int'));
     League\FactoryMuffin\Facade::define('Tzookb\\TBMsg\\Models\\Eloquent\\Message', array('sender_id' => 'int', 'conv_id' => 'factory|Tzookb\\TBMsg\\Models\\Eloquent\\Conversation', 'content' => 'int', 'created_at' => 'int', 'updated_at' => 'int'));
     League\FactoryMuffin\Facade::define('Tzookb\\TBMsg\\Models\\Eloquent\\MessageStatus', array('user_id' => 'int', 'msg_id' => 'factory|Tzookb\\TBMsg\\Models\\Eloquent\\Message', 'self' => 'int', 'status' => 'int'));
 }
<?php

League\FactoryMuffin\Facade::define('WebservicesNl\\Platform\\Webservices\\PlatformConfig', ['connectionTimeout' => 'numberBetween|10;120', 'password' => 'word', 'userName' => 'userName', 'retryMinutes' => 'numberBetween|60;120', 'responseTimeout' => 'numberBetween|20;30']);
League\FactoryMuffin\Facade::define('WebservicesNl\\Protocol\\Soap\\Client\\SoapConfig', ['converter' => function () {
    return new \WebservicesNl\Protocol\Soap\Config\Platform\Webservices\Converter();
}, 'endPoints' => WebservicesNl\Protocol\Soap\Client\SoapConfig::getEndPoints(), 'platformConfig' => function () {
    return League\FactoryMuffin\Facade::instance('WebservicesNl\\Platform\\Webservices\\Config');
}, 'soapHeaders' => []]);
<?php

use WebservicesNl\Protocol\Soap\Client\SoapSettings;
League\FactoryMuffin\Facade::define('WebservicesNl\\Protocol\\Soap\\Client\\SoapSettings', ['authentication' => function () {
    $values = [SOAP_AUTHENTICATION_BASIC, SOAP_AUTHENTICATION_DIGEST];
    return $values[array_rand($values)];
}, 'cacheWsdl' => 'numberBetween|0;3', 'classMap' => null, 'compression' => function () {
    $values = [SOAP_COMPRESSION_DEFLATE, SOAP_COMPRESSION_GZIP, SOAP_COMPRESSION_ACCEPT];
    return $values[array_rand($values)];
}, 'connectionTimeout' => 'numberBetween|6;60', 'context' => '', 'encoding' => 'UTF-8', 'exceptions' => false, 'features' => function () {
    $values = [SOAP_SINGLE_ELEMENT_ARRAYS, SOAP_USE_XSI_ARRAY_TYPE, SOAP_WAIT_ONE_WAY_CALLS];
    return $values[array_rand($values)];
}, 'keepAlive' => 'boolean', 'localCert' => null, 'login' => 'userName', 'passphrase' => 'sentence', 'password' => 'word', 'proxyHost' => '', 'proxyLogin' => '', 'proxyPassword' => 'word', 'proxyPort' => 'numberBetween|1000;2000', 'soapVersion' => function () {
    return SOAP_1_1;
}, 'sslMethod' => function () {
    return array_rand(SoapSettings::$sslMethods);
}, 'typeMap' => null, 'uri' => '', 'userAgent' => 'userAgent']);