egroupware/admin/tests/CommandBase.php
nathangray be6903b074 - Tests for user & group commands
- Count the admin history to check if commands are logging
2018-08-29 16:30:33 -06:00

33 lines
755 B
PHP

<?php
/**
* EGroupware Api: Application test base class
*
* @link http://www.stylite.de
* @package api
* @subpackage test
* @author Nathan Gray
* @copyright (c) 2016 Nathan Gray
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
require_once realpath(__DIR__.'/../../api/tests/LoggedInTest.php'); // Application test base
/**
* Base class for admin command tests
*
* Extend this class to test one command.
*/
abstract class CommandBase extends EGroupware\Api\LoggedInTest
{
/**
* Get how many entries in the admin command history log so we can see if
* a command made a log entry.
*/
protected function get_log_count()
{
return count(admin_cmd::search(array()));
}
}