lithium\tests\cases\action\ControllerTest::testRenderWithDataArray PHP Метод

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

Verifies that data array is passed on to controller's response.
    public function testRenderWithDataArray()
    {
        $request = new Request();
        $request->params['controller'] = 'lithium\\tests\\mocks\\action\\MockPostsController';
        $controller = new MockPostsController(compact('request') + array('classes' => array('media' => 'lithium\\tests\\mocks\\action\\MockMediaClass')));
        $controller->set(array('set' => 'data'));
        $controller->render(array('data' => array('render' => 'data')));
        $expected = array('set' => 'data', 'render' => 'data');
        $this->assertEqual($expected, $controller->response->data);
    }