Kraken\_Unit\Console\Client\ClientTest::testApiStart_EmitsEvents PHP Method

testApiStart_EmitsEvents() public method

    public function testApiStart_EmitsEvents()
    {
        $loop = $this->getMock(Loop::class, [], [], '', false);
        $loop->expects($this->once())->method('start');
        $loop->expects($this->once())->method('onTick')->will($this->returnCallback(function ($callable) {
            $callable();
        }));
        $runtime = $this->createRuntime(['getLoop']);
        $runtime->expects($this->atLeastOnce())->method('getLoop')->will($this->returnValue($loop));
        $runtime->on('start', $this->expectCallableOnce());
        $runtime->on('command', $this->expectCallableOnce());
        $runtime->start();
    }