Jobby\Tests\BackgroundJobTest::testCheckMaxRuntimeShouldFailIsExceeded PHP Method

testCheckMaxRuntimeShouldFailIsExceeded() public method

    public function testCheckMaxRuntimeShouldFailIsExceeded()
    {
        if ($this->helper->getPlatform() !== Helper::UNIX) {
            $this->markTestSkipped("'maxRuntime' is not supported on Windows");
        }
        $helper = $this->getMock('Jobby\\Helper', ['getLockLifetime']);
        $helper->expects($this->once())->method('getLockLifetime')->will($this->returnValue(2));
        $this->runJob(['command' => 'true', 'maxRuntime' => 1], $helper);
        $this->assertContains('MaxRuntime of 1 secs exceeded! Current runtime: 2 secs', $this->getLogContent());
    }