Ojs\JournalBundle\Tests\Controller\JournalIndexControllerTest::testNew PHP 메소드

testNew() 공개 메소드

public testNew ( )
    public function testNew()
    {
        $this->logIn();
        $client = $this->client;
        $crawler = $client->request('GET', '/journal/1/index/new/');
        $this->assertStatusCode(200, $client);
        $form = $crawler->filter('form[name=journal_index]')->form();
        $form['journal_index[index]'] = '3';
        $form['journal_index[link]'] = 'http://phpunit-ojs.io';
        $client->submit($form);
        $this->assertTrue($client->getResponse()->isRedirect());
        $client->followRedirect();
        $this->assertContains('http://phpunit-ojs.io', $this->client->getResponse()->getContent());
    }