You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DefaultGeneratorTest.php 710B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace Faker\Test;
  3. use Faker\DefaultGenerator;
  4. class DefaultGeneratorTest extends \PHPUnit_Framework_TestCase
  5. {
  6. public function testGeneratorReturnsNullByDefault()
  7. {
  8. $generator = new DefaultGenerator;
  9. $this->assertSame(null, $generator->value);
  10. }
  11. public function testGeneratorReturnsDefaultValueForAnyPropertyGet()
  12. {
  13. $generator = new DefaultGenerator(123);
  14. $this->assertSame(123, $generator->foo);
  15. $this->assertNotSame(null, $generator->bar);
  16. }
  17. public function testGeneratorReturnsDefaultValueForAnyMethodCall()
  18. {
  19. $generator = new DefaultGenerator(123);
  20. $this->assertSame(123, $generator->foobar());
  21. }
  22. }