Category : testing

the function imageUrl() does not work anymore public function load(ObjectManager $manager) { $faker = Factory:: create(‘FR-fr’); for ($i = 1; $i < 30; $i++) { $ad = new Ad(); $title = $faker->sentence(); $coverImage = $faker->imageUrl(1000, 350); $coverImage = imageUrl2(1000, 350); what is the alternative? Source: Symfony4..

Read more

the function imageUrl() does not work anymore public function load(ObjectManager $manager) { $faker = Factory:: create(‘FR-fr’); for ($i = 1; $i < 30; $i++) { $ad = new Ad(); $title = $faker->sentence(); $coverImage = $faker->imageUrl(1000, 350); $coverImage = imageUrl2(1000, 350); what is the alternative? Source: Symfony4..

Read more

The function imageUrl() in library https://github.com/fzaninotto/Faker does not work anymore public function load(ObjectManager $manager) { $faker = Factory:: create(‘FR-fr’); for ($i = 1; $i < 30; $i++) { $title = $faker->sentence(); $coverImage = $faker->imageUrl(1000, 350); } what is the alternative? Source: Symfony4..

Read more

I have an issue with Panther in a Symfony 4.4 project. The project have LiipFunctionnalTestBundle on it, but for testing JS as well, i wanted to have Panther. I’ve installed Panther, in my composer i’ve "symfony/panther": "^0.8.0"," and i can extends my class with PantherTestCase or use PantherTestCaseTrait to have Panther and Liip (according to ..

Read more

I run a CLI Symfony command that works on last month transactions. I can’t think of a way to test it with Behat. Following scenario works but won’t work in December: Scenario: Do something with last month transactions Given there is a transaction "7ccf7387-d45b-4aab-ba52-f25357e4cf75" for 2020-10 And there is a transaction "39d7f278-0687-4ded-a283-4263e81ec09e" for 2020-10 When ..

Read more

I am not able to run any unit test cases in Symfony project. I’ve followed everything from official documentation here. https://symfony.com/doc/current/testing.html Here is my simple unit test code. public function testGetBalance() { $client = static::createClient(); $client->request(‘GET’, ‘/back_accounts/1/balance’); $this->assertEquals(200, $client->getResponse()->getStatusCode()); } And I get this error message. [error] Uncaught PHP Exception SymfonyComponentHttpKernelExceptionNotFoundHttpException: "No route found for ..

Read more