Ojs\JournalBundle\Tests\Controller\ManagerPublisherThemeControllerTest::testEdit PHP Method

testEdit() public method

public testEdit ( )
    public function testEdit()
    {
        $this->logIn();
        $client = $this->client;
        $id = $this->sampleObjectLoader->loadPublisherTheme();
        $crawler = $client->request('GET', '/publisher/1/theme/' . $id . '/edit');
        $this->assertStatusCode(200, $client);
        $form = $crawler->filter('form[name=publisher_theme]')->form();
        $form['publisher_theme[title]'] = 'Publisher Theme Edit Title - phpunit';
        $form['publisher_theme[public]'] = '1';
        $form['publisher_theme[css]'] = 'css';
        $client->submit($form);
        $this->assertTrue($client->getResponse()->isRedirect());
        $client->followRedirect();
        $this->assertContains('Publisher Theme Edit Title - phpunit', $this->client->getResponse()->getContent());
    }