protected function setUp() { if (!class_exists('PhpConsole\\Connector')) { $this->markTestSkipped('PHP Console library not found. See https://github.com/barbushin/php-console#installation'); } $this->connector = $this->initConnectorMock(); $this->debugDispatcher = $this->initDebugDispatcherMock($this->connector); $this->connector->setDebugDispatcher($this->debugDispatcher); $this->errorDispatcher = $this->initErrorDispatcherMock($this->connector); $this->connector->setErrorsDispatcher($this->errorDispatcher); }
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())); }