Joli\SlackSecretSanta\Tests\SantaControllerTest::test_finish_page_works_with_valid_hash_for_failed_secret_santa PHP Метод

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

    public function test_finish_page_works_with_valid_hash_for_failed_secret_santa()
    {
        $secretSanta = new SecretSanta('azerty', ['toto1' => 'toto2', 'toto2' => 'toto3'], null);
        $client = static::createClient();
        $this->prepareSession($client, 'secret-santa-azerty', $secretSanta);
        $crawler = $client->request('GET', '/finish/azerty');
        $response = $client->getResponse();
        $this->assertSame(200, $response->getStatusCode());
        $this->assertGreaterThan(0, $crawler->filter("html:contains('A technical error occurred when sending messages to users')")->count());
        $this->assertGreaterThan(0, $crawler->filter('html:contains("@toto1 must offer a gift to @toto2")')->count());
    }