-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test the same value if it already exist in property
- Loading branch information
Showing
3 changed files
with
59 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace PHPUnit; | ||
|
||
class Constructor | ||
{ | ||
/** @var string */ | ||
private $string; | ||
|
||
/** @var int */ | ||
private $int; | ||
|
||
/** @var bool */ | ||
private $bool; | ||
|
||
public function __construct(string $string, int $int, bool $bool) | ||
{ | ||
$this->string = $string; | ||
$this->int = $int; | ||
$this->bool = $bool; | ||
} | ||
|
||
public function string(): string | ||
{ | ||
return $this->string; | ||
} | ||
|
||
public function int(): int | ||
{ | ||
return $this->int; | ||
} | ||
|
||
public function isBool(): bool | ||
{ | ||
return $this->bool; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace PHPUnit; | ||
|
||
use DtoTester\DtoTest; | ||
|
||
class ContructorTest extends DtoTest | ||
{ | ||
protected function getInstance() | ||
{ | ||
return new Constructor('string', 42, false); | ||
} | ||
} |