Skip to content

Commit

Permalink
Merge pull request #80 from cultuurnet/name-parameter-php7
Browse files Browse the repository at this point in the history
Add name parameter & test to legacy branch
  • Loading branch information
LucWollants authored Aug 27, 2024
2 parents 6a91d21 + f32d105 commit ed6a354
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Parameter/Name.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

declare(strict_types=1);

namespace CultuurNet\SearchV3\Parameter;

final class Name extends AbstractParameter
{
public function __construct(string $name)
{
$this->value = $name;
$this->key = 'name';
}
}
21 changes: 21 additions & 0 deletions test/Parameter/NameTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

declare(strict_types=1);

namespace CultuurNet\SearchV3\Parameter;

use PHPUnit\Framework\TestCase;

final class NameTest extends TestCase
{
public function testConstructor(): void
{
$price = new Name('Foobar');

$key = $price->getKey();
$value = $price->getValue();

$this->assertEquals('name', $key);
$this->assertEquals('Foobar', $value);
}
}

0 comments on commit ed6a354

Please sign in to comment.