Ojs\JournalBundle\Tests\Controller\JournalContactControllerTest::testEdit PHP Метод

testEdit() публичный Метод

public testEdit ( )
    public function testEdit()
    {
        $this->logIn();
        $client = $this->client;
        $entityId = $this->sampleObjectLoader->loadContact();
        $crawler = $client->request('GET', '/journal/1/contact/' . $entityId . '/edit');
        $this->assertStatusCode(200, $client);
        $form = $crawler->filter('form[name=journal_contact]')->form();
        $form['journal_contact[contactType]'] = '1';
        $form['journal_contact[fullName]'] = 'Contact Edit Name - phpunit';
        $form['journal_contact[address]'] = 'contact Edit address phpunit';
        $client->submit($form);
        $this->assertTrue($client->getResponse()->isRedirect());
        $client->followRedirect();
        $this->assertContains('Contact Edit Name - phpunit', $this->client->getResponse()->getContent());
    }