示例#1
0
 /**
  * Send message to PHP Console connector
  * @param \PhpConsole\Message $message
  */
 protected function sendMessage(\PhpConsole\Message $message)
 {
     if (!$this->isIgnored($message)) {
         parent::sendMessage($message);
         $this->sentMessages[] = $message;
     }
 }
示例#2
0
 public function testPrepareForDispatch()
 {
     $config = Mockery::mock('Phpconsole\\Config');
     $client = Mockery::mock('Phpconsole\\Client');
     $snippet = Mockery::mock('Phpconsole\\Snippet');
     $snippet->payload = 'one';
     $snippet->type = 'two';
     $snippet->projectApiKey = 'three';
     $snippet->encryptionVersion = 'four';
     $snippet->isEncrypted = 'five';
     $snippet->fileName = 'six';
     $snippet->lineNumber = 'seven';
     $snippet->context = 'eight';
     $snippet->address = 'nine';
     $snippet->hostname = 'ten';
     $dispatcher = new Dispatcher($config, $client);
     $result = $dispatcher->prepareForDispatch(array($snippet));
     $expected = array(array('payload' => 'one', 'type' => 'two', 'projectApiKey' => 'three', 'encryptionVersion' => 'four', 'isEncrypted' => 'five', 'fileName' => 'six', 'lineNumber' => 'seven', 'context' => 'eight', 'address' => 'nine', 'hostname' => 'ten'));
     $this->assertEquals($expected, $result);
     $this->assertInternalType('array', $result);
 }
示例#3
0
 /**
  * @param \PhpConsole\Connector $connector
  * @param \PhpConsole\EvalProvider $evalProvider
  * @param \PhpConsole\Dumper $dumper
  */
 public function __construct(\PhpConsole\Connector $connector, \PhpConsole\EvalProvider $evalProvider, \PhpConsole\Dumper $dumper)
 {
     $this->evalProvider = $evalProvider;
     parent::__construct($connector, $dumper);
 }