Skip to content
This repository has been archived by the owner on Jul 3, 2023. It is now read-only.

Commit

Permalink
add GherkinParamNullableTest
Browse files Browse the repository at this point in the history
  • Loading branch information
edno committed Aug 17, 2021
1 parent a0421f7 commit 4eecdf9
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions tests/unit/GherkinParamNullableTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

class GherkinParamNullableTest extends \Codeception\Test\Unit
{

/**
* @var \UnitTester
*/
protected $module;

protected function _before(): void
{
$module = $this->getModule('Codeception\Extension\GherkinParam');
$module->_reconfigure(
[
'onErrorThrowException' => false,
'onErrorNull' => true
]
);
$this->module = Mockery::spy($module)
->shouldAllowMockingProtectedMethods();
}

protected function _after(): void
{
}

public function testMapParametersToValuesWithExceptionOnIsArray()
{


$param = $this
->module
->mapParametersToValues(
[0,1,2,3,4],
[],
"test"
);

$this->assertNull($param);
}
}

0 comments on commit 4eecdf9

Please sign in to comment.