From 44ba5f7ddfcd2da081bfb2e702d885b0cfeccab2 Mon Sep 17 00:00:00 2001 From: robertfausk Date: Sun, 29 Mar 2020 15:09:47 +0200 Subject: [PATCH] Fix test_build_driver_without_options Refs #3 Refs #1 --- .../PantherExtension/ServiceContainer/Driver/PantherFactory.php | 2 +- tests/Unit/Driver/PantherFactoryTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Robertfausk/Behat/PantherExtension/ServiceContainer/Driver/PantherFactory.php b/src/Robertfausk/Behat/PantherExtension/ServiceContainer/Driver/PantherFactory.php index b7355c3..ed9e4bd 100644 --- a/src/Robertfausk/Behat/PantherExtension/ServiceContainer/Driver/PantherFactory.php +++ b/src/Robertfausk/Behat/PantherExtension/ServiceContainer/Driver/PantherFactory.php @@ -52,7 +52,7 @@ public function buildDriver(array $config) return new Definition( 'Behat\Mink\Driver\PantherDriver', array( - $config['options'] + $config['options'] ?? [], ) ); } diff --git a/tests/Unit/Driver/PantherFactoryTest.php b/tests/Unit/Driver/PantherFactoryTest.php index e4fdea6..848650a 100644 --- a/tests/Unit/Driver/PantherFactoryTest.php +++ b/tests/Unit/Driver/PantherFactoryTest.php @@ -70,6 +70,6 @@ public function test_build_driver_without_options(): void $arguments = $definition->getArguments(); $this->assertArrayHasKey(0, $arguments, 'Arguments of definition should not be empty.'); - $this->assertSame(null, $arguments[0]); + $this->assertSame([], $arguments[0]); } }