phpunit --group annotation

Re: phpunit --group annotation

by Rian Stockbower -
Number of replies: 2

OK, I've done that:

<?php

defined('MOODLE_INTERNAL') || die();

global $CFG;
require_once($CFG->dirroot . '/filter/Link2Wiki/filter.php');

/**
 * Unit tests for Link2Wiki filter
 * @group CompanyExtensions
 * @group Link2Wiki
 */
class filter_Link2Wiki_test extends basic_testcase {

    /**
     * @dataProvider buildWikiUrlDataProvider
     */
    public function test_buildWikiUrl($articleName, $linkText, $expected) {
        //...
    } //...

Then I ran init.php again. This is the output of --list-groups:

Available test group(s):
 - Andrew Nicols
 - Charles Severance csev@unmich.edu
 - Chris Scribner
 - David Jimenez
 - Jordi Piguillem
 - Josep Arus
 - Kenneth Riba
 - Marc Alier
 - Marc Alier (marc.alier@upc.edu)
 - Mark Nielsen
 - Nikolas Galanis
 - Petr Skoda {@link http://skodak.org}
 - Sam Marshall
 - T.J.Hunt@open.ac.uk
 - Yuliya Bozhko <yuliya.bozhko@totaralms.com>
 - __nogroup__
 - core_plugin
 - nicolas@moodle.com

We are running 2.5 right now, if that matters.

In reply to Rian Stockbower

Re: phpunit --group annotation

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Yes, but what happens when you run

phpunit --group Link2Wiki

or

phpunit --group CompanyExtensions

In reply to Tim Hunt

Re: phpunit --group annotation

by Rian Stockbower -

Nothing.

 

$ phpu --group Link2Wiki
Moodle 2.5 (Build: 20130514), mysqli
PHPUnit 3.7.24 by Sebastian Bergmann.

Configuration read from /var/www/html/moodle/phpunit.xml



Time: 0 ms, Memory: 197.50Mb

No tests executed!
vadev@rianjsmoodle: /var/www/html/moodle
$ phpu --group CompanyExtensions
Moodle 2.5 (Build: 20130514), mysqli
PHPUnit 3.7.24 by Sebastian Bergmann.

Configuration read from /var/www/html/moodle/phpunit.xml



Time: 0 ms, Memory: 198.00Mb

By contrast:

$ phpu filter_Link2Vistawiki_test ./filter/Link2Wiki/tests/filter_test.php
Moodle 2.5 (Build: 20130514), mysqli
PHPUnit 3.7.24 by Sebastian Bergmann.

Configuration read from /var/www/html/moodle/phpunit.xml

.........

Time: 1.81 seconds, Memory: 56.50Mb

OK (9 tests, 9 assertions)