| 1 | <?php |
||
| 5 | abstract class ValueObjectHelper extends \PHPUnit_Framework_TestCase |
||
| 6 | { |
||
| 7 | protected $objectUnderTest; |
||
| 8 | protected $value; |
||
| 9 | |||
| 10 | public function testGetReference() |
||
| 11 | { |
||
| 12 | $this->assertEquals($this->value, $this->objectUnderTest->getReference()); |
||
| 13 | } |
||
| 14 | |||
| 15 | public function testToString() |
||
| 16 | { |
||
| 17 | $value = (string) $this->objectUnderTest; |
||
| 18 | $this->assertEquals($this->value, $value); |
||
| 19 | } |
||
| 20 | |||
| 21 | protected function generateRandomValue() |
||
| 22 | { |
||
| 23 | $faker = \Faker\Factory::create(); |
||
| 24 | $this->value = $faker->word; |
||
| 25 | } |
||
| 26 | } |
||
| 27 |