I wrote a test for a piece of my application (Laravel 5.1 / Vagrant homestead) :
<?php
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Faker\Factory as Faker;
class NewAdTest extends TestCase
{
use DatabaseTransactions;
public function test_it_must_create_an_ad()
{
$faker = Faker::create();
$this->visit('/awesome-segment')
->attach($faker->image(), 'avatar')
->press('submit')
->seePageIs('/awesome-segment')
->see('Are you awesome dude ?');
}
}
In that piece of my application, I use Intervention to resize the avatar uploaded. Everything works like a charm in my browser, but when I run that test, Intervention becomes crazy and output me that:
Caused by
exception 'Intervention\Image\Exception\NotSupportedException' with message 'Encoding format (bin) is not supported.' in /home/vagrant/Code/http://ift.tt/1MHrr7G
Do someone has some leads ?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire