Skip to:
Content

bbPress.org

Changeset 5672


Ignore:
Timestamp:
04/07/2015 11:51:05 AM (9 years ago)
Author:
netweb
Message:

Exclude BuddyPress tests when running phpunit

BuddyPress unit testing will conflict with stand alone bbPress user testing, when BuddyPress is active the core members component cannot be deactivated thus testing users with BuddyPress at /member/username vs bbPress only /user/username and custom rewrites /custom-user-slug/username will cause conflicts in user PHPUnit tests.

A new Grunt sub task grunt phpunit:buddypress has been added to test BuddyPress integration with bbPress without compromising bbPress standalone PHPUnit testing.

Props netweb. See #2782

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Gruntfile.js

    r5649 r5672  
    240240                args: [ '-c', 'phpunit.xml.dist' ]
    241241            },
     242            buddypress: {
     243                cmd: 'phpunit',
     244                args: [ '-c', 'tests/phpunit/buddypress.xml' ]
     245            },
    242246            multisite: {
    243247                cmd: 'phpunit',
     
    335339
    336340    // PHPUnit test task.
    337     grunt.registerMultiTask( 'phpunit', 'Runs PHPUnit tests, including the ajax and multisite tests.', function() {
     341    grunt.registerMultiTask( 'phpunit', 'Runs PHPUnit tests, including the BuddyPress and multisite tests.', function() {
    338342        grunt.util.spawn( {
    339343            cmd:  this.data.cmd,
  • trunk/phpunit.xml.dist

    r5610 r5672  
    88    >
    99    <testsuites>
    10         <testsuite>
    11             <directory suffix=".php">tests/phpunit/testcases/</directory>
    12         </testsuite>
    13     </testsuites>
     10        <testsuite>
     11            <directory suffix=".php">tests/phpunit/testcases/</directory>
     12        </testsuite>
     13    </testsuites>
     14    <groups>
     15        <exclude>
     16            <group>buddypress</group>
     17        </exclude>
     18    </groups>
    1419</phpunit>
  • trunk/tests/phpunit/multisite.xml

    r5287 r5672  
    1515        </testsuite>
    1616    </testsuites>
     17    <groups>
     18        <exclude>
     19            <group>buddypress</group>
     20        </exclude>
     21    </groups>
    1722</phpunit>
Note: See TracChangeset for help on using the changeset viewer.