diff options
author | diosmosis <benakamoorthi@fastmail.fm> | 2014-08-10 17:52:37 +0400 |
---|---|---|
committer | diosmosis <benakamoorthi@fastmail.fm> | 2014-08-10 17:52:37 +0400 |
commit | e6cc26c642c0bb9b37aa66e614362401c4705821 (patch) | |
tree | 8209763480ddabb093235c67053f158d5588c014 /core | |
parent | 312ac10d6a1cc37ba094fe895583254687662289 (diff) |
Created unified system for running tests in travis for Piwik Core and any Piwik plugin. System includes a console command (generate:travis-yml) that generates a .travis.yml file for a plugin or core. The travis file will check in travis if it needs to be updated, and if so it will fail the build and tell the user. If a specific command line option is specified supplying a github user token, the .travis.yml file will be updated within travis automatically.
Notes:
- comments and non-travis sections will be preserved
- includes logic for plugins to test themselves against latest stable version instead of just on master
- the system is primarily controlled by environment variables. developers can change/add variables in .travis.yml and the auto-updating will preserve the changes.
Diffstat (limited to 'core')
-rw-r--r-- | core/View.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/View.php b/core/View.php index d9cbfe0b9c..fe6494c87e 100644 --- a/core/View.php +++ b/core/View.php @@ -189,6 +189,17 @@ class View implements ViewInterface return $this->templateVars[$key]; } + /** + * Returns true if a template variable has been set or not. + * + * @param $name The name of the template variable. + * @return bool + */ + public function __isset($name) + { + return isset($this->templateVars[$name]); + } + private function initializeTwig() { $piwikTwig = new Twig(); |