Skip to content

Commit

Permalink
chore: bump olcs/olcs-common (dvsa/olcs-selfserve#29)
Browse files Browse the repository at this point in the history
* chore: bump `olcs/olcs-common` to `5.0.0-beta.2`

* chore: bump `olcs-common` to `5.0.0-beta.3`

* chore: bump `olcs-common` to `5.0.0-beta.3`

* fix: fix tests from updated `olcs-common`
  • Loading branch information
JoshuaLicense authored Jan 25, 2024
1 parent 29306b5 commit 628ae60
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
12 changes: 6 additions & 6 deletions app/selfserve/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
use Common\Service\Helper\TranslationHelperService;
use Common\Service\Helper\UrlHelperService;
use Laminas\Form\ElementInterface;
use Laminas\InputFilter\CollectionInputFilter;
use Laminas\InputFilter\InputFilterInterface;
use Laminas\InputFilter\InputInterface;
use Mockery as m;
use Mockery\Adapter\Phpunit\MockeryTestCase;
use Laminas\Form\Form;
Expand Down Expand Up @@ -115,14 +117,9 @@ public function testAlterFormNi($params)
$postcodeInput = m::mock(InputInterface::class);
$postcodeInput->shouldReceive('setRequired')->with(false)->once();

// Mock for searchPostcode input and its setRequired and setAllowEmpty methods
$searchPostcodeInput = m::mock(InputInterface::class);
$searchPostcodeInput->shouldReceive('setRequired')->with(false)->once();
$searchPostcodeInput->shouldReceive('setAllowEmpty')->with(true)->once();

// Mock the collection of inputs for searchPostcode
$inputsCollection = m::mock(CollectionInputFilter::class);
$inputsCollection->shouldReceive('getInputs')->andReturn([$searchPostcodeInput]);
$inputsCollection->shouldReceive('getInputs')->andReturn([m::mock(InputInterface::class)]);

// Mock the InputFilter for address
$addressInputFilter = m::mock(InputFilterInterface::class);
Expand Down Expand Up @@ -242,14 +239,9 @@ public function testAlterFormGb($params)
$postcodeInput = m::mock(InputInterface::class);
$postcodeInput->shouldReceive('setRequired')->with(false)->once();

// Mock for searchPostcode input and its setRequired and setAllowEmpty methods
$searchPostcodeInput = m::mock(InputInterface::class);
$searchPostcodeInput->shouldReceive('setRequired')->with(false)->once();
$searchPostcodeInput->shouldReceive('setAllowEmpty')->with(true)->once();

// Mock the collection of inputs for searchPostcode
$inputsCollection = m::mock(CollectionInputFilter::class);
$inputsCollection->shouldReceive('getInputs')->andReturn([$searchPostcodeInput]);
$inputsCollection->shouldReceive('getInputs')->andReturn([m::mock(InputInterface::class)]);

// Mock the InputFilter for address
$addressInputFilter = m::mock(InputFilterInterface::class);
Expand Down

0 comments on commit 628ae60

Please sign in to comment.