Ojs\AdminBundle\Tests\Controller\AdminPublisherDesignControllerTest::testEdit PHP Method

testEdit() public method

public testEdit ( )
    public function testEdit()
    {
        $this->logIn();
        $client = $this->client;
        $crawler = $client->request('GET', '/admin/publisher-design/1/edit');
        $this->assertStatusCode(200, $client);
        $form = $crawler->filter('form[name=ojs_adminbundle_publisher_design]')->form();
        $form['ojs_adminbundle_publisher_design[publisher]'] = '1';
        $form['ojs_adminbundle_publisher_design[title]'] = 'Publisher Design - phpunit';
        $form['ojs_adminbundle_publisher_design[editableContent]'] = 'html{}';
        $form['ojs_adminbundle_publisher_design[public]'] = '1';
        $crawler = $client->submit($form);
        $this->assertTrue($client->getResponse()->isRedirect());
        $client->followRedirect();
        $this->assertContains('Publisher Design - phpunit', $this->client->getResponse()->getContent());
    }