pattern-lab / plugin-php-faker

The Faker Plugin adds Faker support to Pattern Lab.
http://patternlab.io/
MIT License
7 stars 16 forks source link

Only the first argument is sent to Faker.image() from data.json #6

Open illepic opened 7 years ago

illepic commented 7 years ago

Within data.json, there is this use of Faker.image():

 "image": {
    "640x480": "Faker.image('dist/public', 720, 200, 'cats', false, true, 'I IS CAT')"
  }

After some weird behavior, we dropped in a quick var_dump(func_get_args()); at the top of \Faker\Provider\Image::image resulting in only the first argument registering:

2017-10-21 at 13 58

Honestly, we probably shouldn't even be writing images out to the filesystem like this to begin with and should just rely on Faker.imageUrl() instead. As you can see, it results in a silly amount of file i/o and residual files:

2017-10-21 at 14 00