Skip to content

Commit

Permalink
Unskip test.
Browse files Browse the repository at this point in the history
Remove now invalid test code as those view properties are no longer set.
The new ORM allows entities to carry validation messages with the
records.
  • Loading branch information
markstory committed May 17, 2014
1 parent 3bba1eb commit b24e492
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions tests/TestCase/Controller/ControllerTest.php
Expand Up @@ -315,7 +315,6 @@ public function testConstructClassesWithComponents() {
* @return void
*/
public function testRender() {
$this->markTestIncomplete('Need to sort out a few more things with the ORM first.');
Configure::write('App.namespace', 'TestApp');
Plugin::load('TestPlugin');

Expand All @@ -335,30 +334,7 @@ public function testRender() {
$result = $Controller->render('/Element/test_element');
$this->assertRegExp('/this is the test element/', (string)$result);
$Controller->view = null;

$Controller = new TestController($request, new Response());
$Controller->uses = ['TestPlugin.TestPluginComment'];
$Controller->helpers = array('Html');
$Controller->constructClasses();
$expected = ['title' => 'tooShort'];
$Controller->TestPluginComment->validationErrors = $expected;

$Controller->viewPath = 'Posts';
$result = $Controller->render('index');
$View = $Controller->View;
$this->assertTrue(isset($View->validationErrors['TestPluginComment']));
$this->assertEquals($expected, $View->validationErrors['TestPluginComment']);

$expectedModels = [
'TestPluginComment' => [
'className' => 'TestPlugin\Model\TestPluginComment'
],
'Post' => [
'className' => 'TestApp\Model\Post'
]
];
$this->assertEquals($expectedModels, $Controller->request->params['models']);
}
}

/**
* test that a component beforeRender can change the controller view class.
Expand Down

0 comments on commit b24e492

Please sign in to comment.