Ejemplo n.º 1
0
 public function __construct($config, $serviceRestProxy)
 {
     $this->config = $config;
     $this->restProxy = $serviceRestProxy;
     $this->xmlSerializer = new XmlSerializer();
     Logger::setLogFile('C:\\log.txt');
 }
 public function __construct()
 {
     $this->xmlSerializer = new XmlSerializer();
     $this->builder = new ServicesBuilder();
     Logger::setLogFile('C:\\log.txt');
     // Enable PHP asserts
     assert_options(ASSERT_ACTIVE, 1);
     assert_options(ASSERT_WARNING, 0);
     assert_options(ASSERT_QUIET_EVAL, 1);
     assert_options(ASSERT_CALLBACK, 'Tests\\Framework\\RestProxyTestBase::assertHandler');
 }
Ejemplo n.º 3
0
 /**
  * @covers WindowsAzure\Common\Internal\Logger::log
  * @covers WindowsAzure\Common\Internal\Logger::setLogFile
  */
 public function testLogWithString()
 {
     // Setup
     $virtualPath = VirtualFileSystem::newFile(Resources::EMPTY_STRING);
     $tip = 'This is string';
     $expected = "{$tip}\nI'm a string\n";
     Logger::setLogFile($virtualPath);
     // Test
     Logger::log('I\'m a string', $tip);
     // Assert
     $actual = file_get_contents($virtualPath);
     $this->assertEquals($expected, $actual);
 }