<commit_before><?php

namespace MediaMonks\SonataMediaBundle\Tests\Functional;

class ImageProviderTest extends AbstractProviderTestAbstract
{
    public function testImage()
    {
        $provider = 'image';

        $crawler = $this->client->request('GET', self::BASE_PATH.'create?provider='.$provider);

        $form = $crawler->selectButton('Create')->form();

        $this->assertSonataFormValues(
            $form,
            [
                'provider' => $provider,
            ]
        );

        $this->setFormBinaryContent($form, $this->getFixturesPath().'monk.jpg');

        $crawler = $this->client->submit($form);
        $form = $crawler->selectButton('Update')->form();

        $this->assertSonataFormValues($form, ['title' => 'monk']);

        $this->client->request('GET', self::BASE_PATH.'list');<commit_msg>Add debug to form in test<commit_after><?php

namespace MediaMonks\SonataMediaBundle\Tests\Functional;

class ImageProviderTest extends AbstractProviderTestAbstract
{
    public function testImage()
    {
        $provider = 'image';

        $crawler = $this->client->request('GET', self::BASE_PATH.'create?provider='.$provider);

        $form = $crawler->selectButton('Create')->form();

        $this->assertSonataFormValues(
            $form,
            [
                'provider' => $provider,
            ]
        );

        $this->setFormBinaryContent($form, $this->getFixturesPath().'monk.jpg');

        echo $form->getMethod() . PHP_EOL;
        print_r($form->getPhpFiles());
        print_r($form->getPhpValues());

        $crawler = $this->client->submit($form);
        $form = $crawler->selectButton('Update')->form();

        $this->assertSonataFormValues($form, ['title' => 'monk']);

        $this->client->request('GET', self::BASE_PATH.'list');
{'fraction_non_alphanumeric': 0.1717283268912203, 'fraction_numerical': 0.0, 'mean_word_length': 2.863539445628998, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 38, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4317137', 'n_tokens_mistral': 542, 'n_tokens_neox': 520, 'n_words': 73}