Skip to content

Commit

Permalink
Restructured tests for clean runs from BU test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Burns committed Apr 6, 2013
1 parent b11723e commit 7fc1bb8
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 6 deletions.
1 change: 0 additions & 1 deletion phpunit.xml
Expand Up @@ -6,7 +6,6 @@
<testsuites>
<testsuite name="UnitTests">
<directory prefix="test_" suffix=".php">./tests</directory>
<exclude>./tests/selenium</exclude>
</testsuite>
</testsuites>
</phpunit>
2 changes: 1 addition & 1 deletion selenium.xml
Expand Up @@ -8,7 +8,7 @@
</php>
<testsuites>
<testsuite name="SeleniumTests">
<directory prefix="test_" suffix=".php">./tests/selenium</directory>
<directory prefix="test_" suffix=".php">./tests-selenium</directory>
</testsuite>
</testsuites>
</phpunit>
@@ -1,5 +1,7 @@
<?php

require_once dirname( __FILE__ ) . '/../tests/includes/classes.group-factory.php';

/**
* @group bu-section-editing-selenium
*/
Expand All @@ -13,7 +15,7 @@ public function setUp() {
$this->factory->group = new WP_UnitTest_Factory_For_Group( $this->factory );

// Create global state programmatically
$this->factory->user->create(array('user_login' => 'section_editor','user_pass'=>'buse_test_pass','role'=>'section_editor'));
$this->factory->user->create(array('role'=>'section_editor'));

}

Expand Down
2 changes: 0 additions & 2 deletions tests/bootstrap.php
Expand Up @@ -20,5 +20,3 @@
);

require getenv( 'WP_TESTS_DIR' ) . '/includes/bootstrap.php';

require_once dirname( __FILE__ ) . '/includes/classes.group-factory.php';
5 changes: 4 additions & 1 deletion tests/test_bu_edit_group.php
@@ -1,8 +1,11 @@
<?php

require_once dirname( __FILE__ ) . '/includes/classes.group-factory.php';

/**
* More traditional unit tests against the BU_Edit_Group class
*
*
* @group bu
* @group bu-section-editing
**/
class Test_BU_Edit_Group extends WP_UnitTestCase {
Expand Down
3 changes: 3 additions & 0 deletions tests/test_bu_edit_groups.php
@@ -1,10 +1,13 @@
<?php

require_once dirname( __FILE__ ) . '/includes/classes.group-factory.php';

/**
* Integration tests for BU_Edit_Groups controller class
*
* @todo investigate using mock objects here
*
* @group bu
* @group bu-section-editing
**/
class Test_BU_Edit_Groups extends WP_UnitTestCase {
Expand Down
3 changes: 3 additions & 0 deletions tests/test_bu_group_permissions.php
@@ -1,8 +1,11 @@
<?php

require_once dirname( __FILE__ ) . '/includes/classes.group-factory.php';

/**
* Integration tests for group permissions operations
*
* @group bu
* @group bu-section-editing
**/
class Test_BU_Group_Permissions extends WP_UnitTestCase {
Expand Down
3 changes: 3 additions & 0 deletions tests/test_roles_caps.php
@@ -1,6 +1,9 @@
<?php

require_once dirname( __FILE__ ) . '/includes/classes.group-factory.php';

/**
* @group bu
* @group bu-section-editing
**/
class Test_BU_Section_Editing_Caps extends WP_UnitTestCase {
Expand Down

0 comments on commit 7fc1bb8

Please sign in to comment.