lithium\tests\cases\action\ControllerTest::testRenderWithAlternateTemplate PHP Method

testRenderWithAlternateTemplate() public method

Tests calling Controller::render() with parameters to render an alternate template from the default.
    public function testRenderWithAlternateTemplate()
    {
        $postsController = new MockPostsController(array('classes' => array('media' => 'lithium\\tests\\mocks\\action\\MockMediaClass')));
        $result = $postsController(null, array('action' => 'view2'));
        $this->assertEqual('view', $result->options['template']);
        $this->assertEqual('default', $result->options['layout']);
        $result = $postsController(null, array('action' => 'view3'));
        $this->assertEqual('view', $result->options['template']);
        $this->assertFalse($result->options['layout']);
    }