Skip to content

Commit

Permalink
Merge pull request #49 from AntikCz/travis
Browse files Browse the repository at this point in the history
Fixed error with php 5.3.3 in travis
  • Loading branch information
stekycz committed Feb 22, 2016
2 parents ff2ef03 + 248537a commit 3588344
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
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
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,8 @@
},
"autoload-dev": {
"classmap": ["tests/CronnerTests/objects"]
},
"config": {
"disable-tls": true
}
}
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 3588344

Please sign in to comment.