Skip to content

Commit

Permalink
Added test for custom php bin
Browse files Browse the repository at this point in the history
  • Loading branch information
peppeocchi committed Oct 14, 2017
1 parent 9cd1ea0 commit ceb7f8c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/GO/SchedulerTest.php
Expand Up @@ -30,6 +30,22 @@ public function testShouldQueueAPhpScript()
$this->assertEquals(count($scheduler->getQueuedJobs()), 1);
}

public function testShouldAllowCustomPhpBin()
{
$scheduler = new Scheduler();
$script = __DIR__ . '/../test_job.php';

// Create fake bin
$bin = __DIR__ . '/../custom_bin';
touch($bin);

$job = $scheduler->php($script, $bin)->inForeground();

$this->assertEquals($bin . ' ' . $script, $job->compile());

unlink($bin);
}

/**
* @expectedException InvalidArgumentException
*/
Expand Down

0 comments on commit ceb7f8c

Please sign in to comment.