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

testNew() 공개 메소드

public testNew ( )
    public function testNew()
    {
        $this->logIn();
        $client = $this->client;
        $crawler = $client->request('GET', '/journal/1/article/1/citation/new');
        $this->assertStatusCode(200, $client);
        $form = $crawler->filter('form[name=citation]')->form();
        $form['citation[raw]'] = 'Citation title - phpunit';
        $form['citation[type]'] = '0';
        $form['citation[orderNum]'] = '2';
        $crawler = $client->submit($form);
        $this->assertTrue($client->getResponse()->isRedirect());
        $client->followRedirect();
        $this->assertContains('Citation title - phpunit', $this->client->getResponse()->getContent());
    }