Ojs\AdminBundle\Tests\Controller\AdminSubjectControllerTest::testEdit PHP Метод

testEdit() публичный Метод

public testEdit ( )
    public function testEdit()
    {
        $this->logIn();
        $client = $this->client;
        $crawler = $client->request('GET', '/admin/subject/1/edit');
        $this->assertStatusCode(200, $client);
        $form = $crawler->filter('form[name=subject]')->form();
        $form['subject[translations][' . $this->locale . '][subject]'] = 'Subject Edit - phpunit';
        $form['subject[translations][' . $this->locale . '][description]'] = 'content Edit - phpunit';
        $crawler = $client->submit($form);
        $this->assertTrue($client->getResponse()->isRedirect());
        $client->followRedirect();
        $this->assertContains('Subject Edit - phpunit', $this->client->getResponse()->getContent());
    }