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

testEdit() public method

public testEdit ( )
    public function testEdit()
    {
        $this->logIn();
        $client = $this->client;
        $crawler = $client->request('GET', '/admin/index/2/edit');
        $this->assertStatusCode(200, $client);
        $form = $crawler->filter('form[name=index]')->form();
        $form['index[name]'] = 'Index Name Edit';
        $form['index[status]']->tick();
        $client->submit($form);
        $this->assertTrue($client->getResponse()->isRedirect());
        $client->followRedirect();
        $this->assertContains('Index Name Edit', $this->client->getResponse()->getContent());
    }