Skip to content

Commit

Permalink
[2.0] Updated test suite
Browse files Browse the repository at this point in the history
    - Created phpunit.xml
    - Renamed TestHelper.php Bootstrap.php; latter now referenced in phpunit.xml
    - Uses autoloading
    - Stripped require_once calls globally (will need to run individual groups
      iteratively to determine if any test caes are missing necessary calls)
    - Controller tests now run (but 4 new errors)

git-svn-id: http://framework.zend.com/svn/framework/standard/branches/development-2.0@21390 44c647ce-9c0f-0410-b52a-842ac1e357ba
  • Loading branch information
matthew committed Mar 8, 2010
1 parent 259b9e8 commit 698c0f7
Show file tree
Hide file tree
Showing 1,473 changed files with 36 additions and 15,571 deletions.
101 changes: 0 additions & 101 deletions tests/AllTests.php

This file was deleted.

19 changes: 8 additions & 11 deletions tests/TestHelper.php → tests/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,6 @@
* @version $Id$
*/

/*
* Include PHPUnit dependencies
*/
require_once 'PHPUnit/Framework.php';
require_once 'PHPUnit/Framework/IncompleteTestError.php';
require_once 'PHPUnit/Framework/TestCase.php';
require_once 'PHPUnit/Framework/TestSuite.php';
require_once 'PHPUnit/Runner/Version.php';
require_once 'PHPUnit/TextUI/TestRunner.php';
require_once 'PHPUnit/Util/Filter.php';

/*
* Set error reporting to the level to which Zend Framework code must comply.
*/
Expand All @@ -57,6 +46,14 @@
);
set_include_path(implode(PATH_SEPARATOR, $path));

/**
* Setup autoloading
*/
require_once 'Zend/Loader/Autoloader.php';
$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->registerNamespace('PHPUnit_');


/*
* Load the user-defined test configuration file, if it exists; otherwise, load
* the default configuration.
Expand Down
11 changes: 0 additions & 11 deletions tests/Zend/Acl/AclTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,7 @@
* @version $Id$
*/

require_once dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'TestHelper.php';

require_once 'Zend/Acl.php';
require_once 'Zend/Acl/Resource.php';
require_once 'Zend/Acl/Role.php';
require_once dirname(__FILE__) . '/_files/MockAssertion.php';

/**
* @category Zend
Expand Down Expand Up @@ -1072,7 +1067,6 @@ public function testRoleInheritanceSupportsCheckingOnlyParents()
*/
public function testAclInternalDFSMethodsBehaveProperly()
{
require_once dirname(__FILE__) . '/_files/ExtendedAclZF2234.php';
$acl = new Zend_Acl_ExtendedAclZF2234();

$someResource = new Zend_Acl_Resource('someResource');
Expand Down Expand Up @@ -1172,10 +1166,6 @@ public function testAclAssertionsGetOriginalIsAllowedObjects()
protected function _loadUseCase1()
{
if (!class_exists('Zend_Acl_UseCase1_Acl')) {
require_once dirname(__FILE__) . '/_files/UseCase1/User.php';
require_once dirname(__FILE__) . '/_files/UseCase1/BlogPost.php';
require_once dirname(__FILE__) . '/_files/UseCase1/UserIsBlogPostOwnerAssertion.php';
require_once dirname(__FILE__) . '/_files/UseCase1/Acl.php';
}
return new Zend_Acl_UseCase1_Acl();
}
Expand Down Expand Up @@ -1246,7 +1236,6 @@ public function testResourceObjectImplementsToString() {
* @group ZF-7973
*/
public function testAclPassesPrivilegeToAssertClass() {
require_once dirname(__FILE__) . '/_files/AssertionZF7973.php';
$assertion = new Zend_Acl_AclTest_AssertionZF7973();

$acl = new Zend_Acl();
Expand Down
1 change: 0 additions & 1 deletion tests/Zend/Acl/_files/AssertionZF7973.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php
require_once 'Zend/Acl/Assert/Interface.php';

class Zend_Acl_AclTest_AssertionZF7973 implements Zend_Acl_Assert_Interface {
public function assert(Zend_Acl $acl,
Expand Down
Loading

0 comments on commit 698c0f7

Please sign in to comment.