1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
<?php
namespace PhpConsole\Test;
class Connector extends Test {
/** @var \PhpConsole\Connector */ protected $connector;
protected function setUp() { parent::setUp(); $this->connector = \PhpConsole\Connector::getInstance(); }
public function testIsSingleton() { $this->assertIsSingleton('\PhpConsole\Connector'); }
public function testIsNotActiveClientByDefault() { $this->assertFalse(\PhpConsole\Connector::getInstance()->isActiveClient()); }
public function testIsNotAuthorizedByDefault() { $this->assertFalse(\PhpConsole\Connector::getInstance()->isAuthorized()); }
public function testGetDebugDispatcher() { $this->assertInstanceOf('\PhpConsole\Dispatcher\Debug', $this->connector->getDebugDispatcher()); }
public function testSetDebugDispatcher() { $dispatcher = new \PhpConsole\Dispatcher\Debug($this->connector, new \PhpConsole\Dumper()); $this->connector->setDebugDispatcher($dispatcher); $this->assertEquals(spl_object_hash($dispatcher), spl_object_hash($this->connector->getDebugDispatcher())); }
public function testGetErrorsDispatcher() { $this->assertInstanceOf('\PhpConsole\Dispatcher\Errors', $this->connector->getErrorsDispatcher()); }
public function testSetErrorsDispatcher() { $dispatcher = new \PhpConsole\Dispatcher\Errors($this->connector, new \PhpConsole\Dumper()); $this->connector->setErrorsDispatcher($dispatcher); $this->assertEquals(spl_object_hash($dispatcher), spl_object_hash($this->connector->getErrorsDispatcher())); }
public function testSetEvalDispatcher() { $dispatcher = new \PhpConsole\Dispatcher\Evaluate($this->connector, new \PhpConsole\EvalProvider(), new \PhpConsole\Dumper()); $this->connector->setEvalDispatcher($dispatcher); $this->assertEquals(spl_object_hash($dispatcher), spl_object_hash($this->connector->getEvalDispatcher())); }
public function testGetEvalDispatcher() { $this->assertInstanceOf('\PhpConsole\Dispatcher\Evaluate', $this->connector->getEvalDispatcher()); } }
|