Пример #1
0
 /**
  * test empty message
  */
 public function testEmptyMessage()
 {
     $config = new Amfphp_Core_Config();
     $gateway = new Amfphp_Core_Gateway(array(), array(), array(), Amfphp_Core_Amf_Constants::CONTENT_TYPE, $config);
     $ret = $gateway->service();
     $this->assertTrue(strpos($ret, 'service') != false);
 }
Пример #2
0
 /**
  * test service
  */
 public function testService()
 {
     $amfTestData = new AmfTestData();
     $testServiceConfig = new TestServicesConfig();
     $testServiceConfig->serviceFolders = $testServiceConfig->serviceFolders;
     $testServiceConfig->serviceNames2ClassFindInfo = $testServiceConfig->serviceNames2ClassFindInfo;
     $gateway = new Amfphp_Core_Gateway(array(), array(), $amfTestData->testServiceRequestPacket, Amfphp_Core_Amf_Constants::CONTENT_TYPE, $testServiceConfig);
     $ret = $gateway->service();
     $this->assertEquals(bin2hex($amfTestData->testServiceResponsePacket), bin2hex($ret));
 }
Пример #3
0
<?php

//	phpinfo();
require_once dirname(__FILE__) . '/../../Amfphp/ClassLoader.php';
require_once dirname(__FILE__) . '/../../Tests/TestData/TestServicesConfig.php';
//load input amf data path from command line arguments
$request = file_get_contents($argv[1]);
$config = new TestServicesConfig();
$gateway = new Amfphp_Core_Gateway(array(), array(), $request, 'application/x-amf', $config);
$gateway->service();
$gateway->output();
Пример #4
0
 public function __construct(Pixie $pixie, array $getData, array $postData, $rawInputData, $contentType, Amfphp_Core_Config $config = null)
 {
     parent::__construct($getData, $postData, $rawInputData, $contentType, $config);
     $this->pixie = $pixie;
 }