Skip to content

Commit

Permalink
More tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pjordaan committed Feb 14, 2021
1 parent 5e42f31 commit 659473b
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/ValueObjects/MockValueObjectWithStringEnumTrait.php
@@ -0,0 +1,16 @@
<?php
namespace Apie\MockObjects\ValueObjects;

use Apie\ValueObjects\StringEnumTrait;
use Apie\ValueObjects\ValueObjectInterface;

class MockValueObjectWithStringEnumTrait implements ValueObjectInterface
{
use StringEnumTrait;

const CONSTANT_A = 'A';

const CONSTANT_B = 'B';

const CONSTANT_C = 'A';
}
23 changes: 23 additions & 0 deletions src/ValueObjects/MockValueObjectWithStringTrait.php
@@ -0,0 +1,23 @@
<?php
namespace Apie\MockObjects\ValueObjects;

use Apie\ValueObjects\StringTrait;
use Apie\ValueObjects\ValueObjectInterface;

class MockValueObjectWithStringTrait implements ValueObjectInterface
{
use StringTrait;

public $validValueRetrieved;

protected function validValue(string $value): bool
{
$this->validValueRetrieved = $value;
return $value !== 'blha';
}

protected function sanitizeValue(string $value): string
{
return strtoupper($value);
}
}

0 comments on commit 659473b

Please sign in to comment.