Bolt\Tests\Controller\Async\GeneralTest::testPopularTags PHP Метод

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

public testPopularTags ( )
    public function testPopularTags()
    {
        $this->setRequest(Request::create('/async/populartags'));
        $response = $this->controller()->popularTags($this->getRequest(), 'tags');
        $this->assertTrue($response instanceof JsonResponse);
        $this->assertSame(Response::HTTP_OK, $response->getStatusCode());
        $json = json_decode($response->getContent());
        $tags = $this->getDefaultTags();
        $this->assertCount(20, $json);
        $this->assertTrue(in_array($json[0]->name, $tags));
    }