Kraken\_Unit\Console\Server\Command\Project\ProjectStopCommandTest::testApiCommand_InvokesProperAction PHP Method

testApiCommand_InvokesProperAction() public method

    public function testApiCommand_InvokesProperAction()
    {
        $command = $this->createCommand();
        $manager = $this->createManager();
        $project = $this->createProjectManager();
        $project->expects($this->once())->method('stopProject')->will($this->returnCallback(function () {
            return new PromiseFulfilled('ok');
        }));
        $result = $this->callProtectedMethod($command, 'command', []);
        $expect = $this->createCallableMock();
        $expect->expects($this->once())->method('__invoke');
        $result->then($expect);
    }