Bluz\Tests\Controller\ReflectionTest::testReflectionWithData PHP Method

testReflectionWithData() public method

Test all reflection options - methods - cache - cache to html - params with type cast - privilege - routes
    public function testReflectionWithData()
    {
        $controllerFile = dirname(__FILE__) . '/../Fixtures/Controllers/ConcreteWithData.php';
        $reflection = new Reflection($controllerFile);
        $reflection->process();
        $this->assertEqualsArray(['CLI', 'GET'], $reflection->getMethod());
        $this->assertEquals(300, $reflection->getCache());
        $this->assertEqualsArray(['a' => 'int', 'b' => 'float', 'c' => 'string'], $reflection->getParams());
        $this->assertEquals('Test', $reflection->getPrivilege());
        $this->assertEqualsArray(['Read', 'Write'], $reflection->getAcl());
        $this->assertArrayHasSize($reflection->getRoute(), 2);
    }