diff --git a/Cronner/DI/CronnerExtension.php b/Cronner/DI/CronnerExtension.php index 15d4a4b..1f246fe 100644 --- a/Cronner/DI/CronnerExtension.php +++ b/Cronner/DI/CronnerExtension.php @@ -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'))); } } @@ -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'))); } } diff --git a/composer.json b/composer.json index 6f292c6..c10742a 100644 --- a/composer.json +++ b/composer.json @@ -39,5 +39,8 @@ }, "autoload-dev": { "classmap": ["tests/CronnerTests/objects"] + }, + "config": { + "disable-tls": true } } diff --git a/tests/CronnerTests/Cronner.phpt b/tests/CronnerTests/Cronner.phpt index 6ed312d..438da80 100644 --- a/tests/CronnerTests/Cronner.phpt +++ b/tests/CronnerTests/Cronner.phpt @@ -227,9 +227,9 @@ 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'); } @@ -237,10 +237,10 @@ class CronnerTest extends \TestCase 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'); }