Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Moodle Filter Opencast
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elc
Moodle Filter Opencast
Commits
64e373e9
Commit
64e373e9
authored
4 years ago
by
n_herr03
Browse files
Options
Downloads
Patches
Plain Diff
added template file for testcases
parent
bd44fe14
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/filter_test.php
+69
-0
69 additions, 0 deletions
tests/filter_test.php
with
69 additions
and
0 deletions
tests/filter_test.php
0 → 100644
+
69
−
0
View file @
64e373e9
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Tests for filter_opencast.
*
* @package filter_opencast
* @category test
* @copyright 2020 Nina Herrmann
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined
(
'MOODLE_INTERNAL'
)
||
die
();
global
$CFG
;
require_once
(
$CFG
->
dirroot
.
'/filter/opencast/filter.php'
);
/**
* Unit tests for Opencast filter.
*
* The Filter displays the data given from the repository opencast to an iFrame
*
* @package filter_opencast
* @category test
* @copyright 2020 Nina Herrmann WWU
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class
filter_opencast_testcase
extends
advanced_testcase
{
/** @var object The filter plugin object to perform the tests on */
protected
$filter
;
/**
* Setup the test framework
*
* @return void
*/
protected
function
setUp
()
{
parent
::
setUp
();
$this
->
resetAfterTest
(
true
);
$this
->
filter
=
new
filter_opencast
(
context_system
::
instance
(),
array
());
}
/**
* Perform the actual tests, once the unit test is set up.
*
* @return void
*/
public
function
test_filter_opencast
()
{
global
$CFG
;
$filter
=
new
filter_opencast
;
$string
=
$filter
->
filter
(
'www.some.de/url/'
);
$this
->
assertEquals
(
''
,
''
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment