Skip to content

Commit

Permalink
DEV: tests - GeneralSettings views: homepageSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
TonisOrmisson committed Nov 15, 2017
1 parent f3737a7 commit a99c612
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
5 changes: 4 additions & 1 deletion application/views/admin/homepagesettings/index.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?php
/* @var $this homepagesettings */
/* @var $this AdminController */
/* @var $dataProvider CActiveDataProvider */
// DO NOT REMOVE This is for automated testing to validate we see that page
echo viewHelper::getViewTestTag('homepageSettings');


?>
<script type="text/javascript">
Expand Down
16 changes: 16 additions & 0 deletions tests/controllers/AdminViewsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ public function addUsersViews()
return require __DIR__."/../data/views/adminUsersViews.php";
}

public function addGeneralSettingsViews()
{
return require __DIR__."/../data/views/adminGeneralSettingsViews.php";
}

/**
* @param string $name
* @param array$view
Expand Down Expand Up @@ -115,4 +120,15 @@ public function testUserViews($name,$view){
$view['route'] = ReplaceFields($view['route'],['{UID}'=>$uid]);
$this->findViewTag($name, $view);
}

/**
* @param string $name
* @param array$view
* @dataProvider addGeneralSettingsViews
*/
public function testGeneralSettingsViews($name, $view)
{
$this->findViewTag($name, $view);
}

}
15 changes: 15 additions & 0 deletions tests/data/views/adminGeneralSettingsViews.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

/**
* This contains a list of survey-related admin views that we can loop for testing
* // TODO not complete views list
*/
return [

// general Settings ---------------------------------------
// --------------------------------------------------

['homepageSettings', ['route'=>'homepagesettings']],


];

0 comments on commit a99c612

Please sign in to comment.