Skip to content

Commit

Permalink
Merge pull request #152 from nexbro/nsec3
Browse files Browse the repository at this point in the history
fix(nsec3): fixes unset nsec3param not working
  • Loading branch information
trizz authored Jun 21, 2024
2 parents e95d400 + e3fd291 commit 6194a9d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Resources/Zone.php
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ public function setNsec3param(?string $nsec3param): self
{
// If set to null, return,
if (is_null($nsec3param)) {
$this->nsec3param = null;
$this->nsec3param = "";

return $this;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Resources/ZoneTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function testSetEmptyNsec3param(): void
{
$zone = new Zone();
$zone->setNsec3param(null);
$this->assertNull($zone->getNsec3param());
$this->assertEmpty($zone->getNsec3param());
}

public function testSetNsec3paramInvalidAlgorithm(): void
Expand Down
2 changes: 1 addition & 1 deletion tests/ZoneTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public function testSetEmptyNsec3param(): void
$connector = Mockery::mock(Connector::class);
$connector->shouldReceive('put')->withArgs(['zones/test.nl.', Mockery::on(function ($transformer) {
$transformed = $transformer->transform();
$this->assertNull($transformed->nsec3param);
$this->assertEmpty($transformed->nsec3param);

return true;
})])->once()->andReturn([]);
Expand Down

0 comments on commit 6194a9d

Please sign in to comment.