Пример #1
0
 public function testLower()
 {
     $plugin = new BasicPlugin();
     $result = $plugin->callFilter('lower', 'FOO');
     $this->assertEquals('foo', $result);
     ob_start();
     $result = $plugin->callFunction('var_dump', ['FOO']);
     $contents = ob_get_contents();
     ob_end_clean();
     $result = $plugin->callFunction('memory_usage', []);
     $this->assertGreaterThan(0, strlen($result));
 }
Пример #2
0
 /**
  * Return the list of functions provided by this plugin.
  * @return string[]
  */
 public static function getFunctionList()
 {
     $parentFunctions = parent::getFunctionList();
     $functions = ['displayCommits', 'renderUserInfo', 'renderListRepoCommitsByPage', 'showActionLinks', 'showAddEmailForm', 'showScopesForm', 'renderUserEmails', 'renderAuthStatus'];
     return array_merge($parentFunctions, $functions);
 }