This file contains hidden or 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
| <?php | |
| declare(strict_types=1); | |
| namespace PHPBrasil\ExemploTest; | |
| use PHPUnit\Framework\TestCase; | |
| class ExemploMockStub extends TestCase | |
| { |
This file contains hidden or 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
| [ | |
| { | |
| "region": "Amsterdam", | |
| "liquidity": 80, | |
| "published": 123 | |
| }, | |
| { | |
| "region": "Utrecht", | |
| "liquidity": 76, | |
| "published": 321 |
This file contains hidden or 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
| <?php | |
| class FooEntity | |
| { | |
| public string $entityId; | |
| public DateTime $date; | |
| public function __construct(string $entityId, DateTime $date) | |
| { | |
| $this->entityId = $entityId; | |
| $this->date = $date; |
This file contains hidden or 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
| <?php | |
| class Book | |
| { | |
| private $rates = []; | |
| public function rate(string $userId, int $rate) : void | |
| { | |
| if (isset($this->rates[$userid])) { | |
| throw new AlreadyRatedThisBook(); | |
| } |
OlderNewer