Skip to content

Commit

Permalink
Fixed error with php 5.3.3 in travis
Browse files Browse the repository at this point in the history
  • Loading branch information
AntikCz committed Feb 21, 2016
1 parent ff2ef03 commit e72845b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ matrix:
env: PHP_BIN=php-cgi

install:
- composer self-update
- composer install --prefer-source --no-interaction --optimize-autoloader

before_script:
Expand Down
4 changes: 2 additions & 2 deletions Cronner/DI/CronnerExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function loadConfiguration()

if ($config['bar'] && class_exists('Tracy\Bar')) {
$container->addDefinition($this->prefix('bar'))
->setClass('stekycz\Cronner\Bar\Tasks', [$this->prefix('@runner'), $this->prefix('@timestampStorage')]);
->setClass('stekycz\Cronner\Bar\Tasks', array($this->prefix('@runner'), $this->prefix('@timestampStorage')));
}
}

Expand All @@ -112,7 +112,7 @@ public function beforeCompile()

if ($builder->hasDefinition($this->prefix('bar'))) {
$builder->getDefinition('tracy.bar')
->addSetup('addPanel', [$this->prefix('@bar')]);
->addSetup('addPanel', array($this->prefix('@bar')));
}
}

Expand Down
14 changes: 7 additions & 7 deletions tests/CronnerTests/Cronner.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -227,20 +227,20 @@ class CronnerTest extends \TestCase

public function testAddingTwoTestsWithTheSameNameInOneObject()
{
$self = $this;
Assert::exception(function () use ($self) {
$self->cronner->addTasks(new SameTaskNameObject());
$cronner = $this->cronner;
Assert::exception(function () use ($cronner) {
$cronner->addTasks(new SameTaskNameObject());
}, '\stekycz\Cronner\DuplicateTaskNameException');
}



public function testAddingTwoTestsWithTheSameNameInMoreObjects()
{
$self = $this;
Assert::exception(function () use ($self) {
$self->cronner->addTasks(new AnotherSimpleTestObject());
$self->cronner->addTasks(new NextSimpleTestObject());
$cronner = $this->cronner;
Assert::exception(function () use ($cronner) {
$cronner->addTasks(new AnotherSimpleTestObject());
$cronner->addTasks(new NextSimpleTestObject());
}, '\stekycz\Cronner\DuplicateTaskNameException');
}

Expand Down

0 comments on commit e72845b

Please sign in to comment.