Frontend\Modules\Faq\Actions\CategoryTest::testCategoryPageContainsQuestion PHP Метод

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

    public function testCategoryPageContainsQuestion()
    {
        $client = static::createClient();
        $crawler = $client->request('GET', '/en/faq/category/faqcategory-for-tests');
        self::assertContains('Is this a working test?', $client->getResponse()->getContent());
        $link = $crawler->selectLink('Is this a working test?')->link();
        $crawler = $client->click($link);
        self::assertEquals(200, $client->getResponse()->getStatusCode());
        self::assertStringEndsWith('/en/faq/detail/is-this-a-working-test', $client->getHistory()->current()->getUri());
        self::assertStringStartsWith('Is this a working test?', $crawler->filter('title')->text());
    }