summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.xml2
-rw-r--r--tests/unit/AllTests.php1
-rw-r--r--tests/unit/Caching/AllTests.php1
-rw-r--r--tests/unit/Caching/TAPCCacheTest.php1
-rw-r--r--tests/unit/Caching/TMemCacheTest.php1
-rw-r--r--tests/unit/Caching/TSqliteCacheTest.php1
-rw-r--r--tests/unit/Caching/mockapp/runtime/.gitignore2
-rw-r--r--tests/unit/Collections/AllTests.php1
-rw-r--r--tests/unit/Collections/TAttributeCollectionTest.php1
-rw-r--r--tests/unit/Collections/TListTest.php1
-rw-r--r--tests/unit/Collections/TMapTest.php1
-rw-r--r--tests/unit/Collections/TPagedDataSourceTest.php1
-rw-r--r--tests/unit/Collections/TPagedListTest.php1
-rw-r--r--tests/unit/Collections/TPriorityListTest.php1
-rw-r--r--tests/unit/Collections/TQueueTest.php1
-rw-r--r--tests/unit/Collections/TStackTest.php1
-rw-r--r--tests/unit/Data/DataGateway/AllTests.php2
-rw-r--r--tests/unit/Data/DataGateway/TSqlCriteriaTest.php2
-rw-r--r--tests/unit/Data/SqlMap/AllTests.php2
-rw-r--r--tests/unit/Data/SqlMap/DataMapper/AllTests.php2
-rw-r--r--tests/unit/Data/SqlMap/DataMapper/TPropertyAccessTest.php2
-rw-r--r--tests/unit/Data/SqlMap/DynamicParameterTest.php2
-rw-r--r--tests/unit/I18N/core/AllTests.php2
-rw-r--r--tests/unit/I18N/core/CultureInfoTest.php2
-rw-r--r--tests/unit/I18N/core/DateFormatTest.php2
-rw-r--r--tests/unit/I18N/core/DateTimeFormatInfoTest.php2
-rw-r--r--tests/unit/I18N/core/NumberFormatInfoTest.php2
-rw-r--r--tests/unit/I18N/core/NumberFormatTest.php2
-rw-r--r--tests/unit/IO/AllTests.php1
-rw-r--r--tests/unit/IO/TTarFileExtractorTest.php1
-rw-r--r--tests/unit/IO/TTextWriterTest.php1
-rw-r--r--tests/unit/Security/AllTests.php1
-rw-r--r--tests/unit/Security/TAuthManagerTest.php1
-rw-r--r--tests/unit/Security/TAuthorizationRuleTest.php1
-rw-r--r--tests/unit/Security/TSecurityManagerTest.php1
-rw-r--r--tests/unit/Security/TUserManagerTest.php1
-rw-r--r--tests/unit/Security/TUserTest.php1
-rw-r--r--tests/unit/TComponentTest.php1
-rw-r--r--tests/unit/Util/AllTests.php1
-rw-r--r--tests/unit/Util/TDateTimeStampTest.php1
-rw-r--r--tests/unit/Util/TLoggerTest.php1
-rw-r--r--tests/unit/Util/TSimpleDateFormatterTest.php1
-rw-r--r--tests/unit/Web/AllTests.php1
-rw-r--r--tests/unit/Web/TAssetManagerTest.php1
-rw-r--r--tests/unit/Web/TCacheHttpSessionTest.php1
-rw-r--r--tests/unit/Web/THttpCookieCollectionTest.php1
-rw-r--r--tests/unit/Web/THttpCookieTest.php1
-rw-r--r--tests/unit/Web/THttpRequestTest.php1
-rw-r--r--tests/unit/Web/THttpResponseTest.php1
-rw-r--r--tests/unit/Web/THttpSessionTest.php1
-rw-r--r--tests/unit/Web/THttpUtilityTest.php1
-rw-r--r--tests/unit/Web/TUriTest.php1
-rw-r--r--tests/unit/Web/UI/ActiveControls/AllTests.php2
-rw-r--r--tests/unit/Web/UI/ActiveControls/TActiveHiddenFieldTest.php2
-rw-r--r--tests/unit/Web/UI/AllTests.php2
-rw-r--r--tests/unit/Web/UI/TClientScriptManagerTest.php2
-rw-r--r--tests/unit/Web/UI/TControlAdapterTest.php2
-rw-r--r--tests/unit/Web/UI/TControlTest.php2
-rw-r--r--tests/unit/Web/UI/TFormTest.php2
-rw-r--r--tests/unit/Web/UI/THtmlWriterTest.php2
-rw-r--r--tests/unit/Web/UI/TPageStatePersisterTest.php2
-rw-r--r--tests/unit/Web/UI/TPageTest.php2
-rw-r--r--tests/unit/Web/UI/TSessionPageStatePersisterTest.php2
-rw-r--r--tests/unit/Web/UI/TTemplateControlTest.php2
-rw-r--r--tests/unit/Web/UI/TTemplateManagerTest.php2
-rw-r--r--tests/unit/Web/UI/TTemplateTest.php2
-rw-r--r--tests/unit/Web/UI/TThemeManagerTest.php2
-rw-r--r--tests/unit/Web/UI/TThemeTest.php2
-rw-r--r--tests/unit/Web/UI/WebControls/AllTests.php2
-rw-r--r--tests/unit/Web/UI/WebControls/TDropDownListTest.php2
-rw-r--r--tests/unit/Web/UI/WebControls/TLabelTest.php2
-rw-r--r--tests/unit/Web/UI/WebControls/TRequiredFieldValidatorTest.php2
-rw-r--r--tests/unit/Web/UI/WebControls/TXmlTransformTest.php2
-rw-r--r--tests/unit/Xml/AllTests.php1
-rw-r--r--tests/unit/Xml/TXmlDocumentTest.php1
-rw-r--r--tests/unit/Xml/TXmlElementListTest.php1
-rw-r--r--tests/unit/Xml/TXmlElementTest.php1
-rw-r--r--tests/unit/bootstrap.php (renamed from tests/unit/phpunit.php)12
78 files changed, 43 insertions, 81 deletions
diff --git a/build.xml b/build.xml
index 27144f87..d7a3872e 100644
--- a/build.xml
+++ b/build.xml
@@ -255,7 +255,7 @@
<target name="test" description="Running unit tests">
<delete dir="${build.test.dir}"/>
<mkdir dir="${build.test.dir}"/>
- <phpunit codecoverage="false" haltonfailure="false" haltonerror="false" printsummary="true" bootstrap="./vendor/autoload.php">
+ <phpunit codecoverage="false" haltonfailure="false" haltonerror="false" printsummary="true" bootstrap="./tests/unit/bootstrap.php">
<batchtest>
<fileset dir="tests/unit">
<include name="**/*Test.php"/>
diff --git a/tests/unit/AllTests.php b/tests/unit/AllTests.php
index e4c022cb..7b8027b3 100644
--- a/tests/unit/AllTests.php
+++ b/tests/unit/AllTests.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/phpunit.php';
if(!defined('PHPUnit_MAIN_METHOD')) {
define('PHPUnit_MAIN_METHOD', 'AllTests::main');
diff --git a/tests/unit/Caching/AllTests.php b/tests/unit/Caching/AllTests.php
index 641311db..bffe3b2f 100644
--- a/tests/unit/Caching/AllTests.php
+++ b/tests/unit/Caching/AllTests.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
if(!defined('PHPUnit_MAIN_METHOD')) {
define('PHPUnit_MAIN_METHOD', 'Caching_AllTests::main');
diff --git a/tests/unit/Caching/TAPCCacheTest.php b/tests/unit/Caching/TAPCCacheTest.php
index 5c6779f0..3cb04361 100644
--- a/tests/unit/Caching/TAPCCacheTest.php
+++ b/tests/unit/Caching/TAPCCacheTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.Caching.TAPCCache');
diff --git a/tests/unit/Caching/TMemCacheTest.php b/tests/unit/Caching/TMemCacheTest.php
index b1baa483..8c1fa934 100644
--- a/tests/unit/Caching/TMemCacheTest.php
+++ b/tests/unit/Caching/TMemCacheTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.Caching.TMemCache');
diff --git a/tests/unit/Caching/TSqliteCacheTest.php b/tests/unit/Caching/TSqliteCacheTest.php
index 59e74420..fd4ab1bf 100644
--- a/tests/unit/Caching/TSqliteCacheTest.php
+++ b/tests/unit/Caching/TSqliteCacheTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.Caching.TSqliteCache');
diff --git a/tests/unit/Caching/mockapp/runtime/.gitignore b/tests/unit/Caching/mockapp/runtime/.gitignore
index e69de29b..d6b7ef32 100644
--- a/tests/unit/Caching/mockapp/runtime/.gitignore
+++ b/tests/unit/Caching/mockapp/runtime/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/tests/unit/Collections/AllTests.php b/tests/unit/Collections/AllTests.php
index efa7eb21..f290be31 100644
--- a/tests/unit/Collections/AllTests.php
+++ b/tests/unit/Collections/AllTests.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
if(!defined('PHPUnit_MAIN_METHOD')) {
define('PHPUnit_MAIN_METHOD', 'Collections_AllTests::main');
diff --git a/tests/unit/Collections/TAttributeCollectionTest.php b/tests/unit/Collections/TAttributeCollectionTest.php
index afded5f3..5805f2d0 100644
--- a/tests/unit/Collections/TAttributeCollectionTest.php
+++ b/tests/unit/Collections/TAttributeCollectionTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.Collections.TAttributeCollection');
diff --git a/tests/unit/Collections/TListTest.php b/tests/unit/Collections/TListTest.php
index a5a1b2b0..349d87ed 100644
--- a/tests/unit/Collections/TListTest.php
+++ b/tests/unit/Collections/TListTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
class ListItem {
public $data='data';
diff --git a/tests/unit/Collections/TMapTest.php b/tests/unit/Collections/TMapTest.php
index 81062855..0634a2a3 100644
--- a/tests/unit/Collections/TMapTest.php
+++ b/tests/unit/Collections/TMapTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
class TMapTest_MapItem {
public $data='data';
diff --git a/tests/unit/Collections/TPagedDataSourceTest.php b/tests/unit/Collections/TPagedDataSourceTest.php
index f016c275..92f4061b 100644
--- a/tests/unit/Collections/TPagedDataSourceTest.php
+++ b/tests/unit/Collections/TPagedDataSourceTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.Collections.TPagedDataSource');
diff --git a/tests/unit/Collections/TPagedListTest.php b/tests/unit/Collections/TPagedListTest.php
index 72eabc31..2d884736 100644
--- a/tests/unit/Collections/TPagedListTest.php
+++ b/tests/unit/Collections/TPagedListTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.Collections.TPagedList');
diff --git a/tests/unit/Collections/TPriorityListTest.php b/tests/unit/Collections/TPriorityListTest.php
index 35c712ae..d1570302 100644
--- a/tests/unit/Collections/TPriorityListTest.php
+++ b/tests/unit/Collections/TPriorityListTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__) . '/../phpunit.php';
class PriorityListItem
{
diff --git a/tests/unit/Collections/TQueueTest.php b/tests/unit/Collections/TQueueTest.php
index 167be249..efee7cb7 100644
--- a/tests/unit/Collections/TQueueTest.php
+++ b/tests/unit/Collections/TQueueTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.Collections.TQueue');
diff --git a/tests/unit/Collections/TStackTest.php b/tests/unit/Collections/TStackTest.php
index 26406f36..89a42749 100644
--- a/tests/unit/Collections/TStackTest.php
+++ b/tests/unit/Collections/TStackTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.Collections.TStack');
diff --git a/tests/unit/Data/DataGateway/AllTests.php b/tests/unit/Data/DataGateway/AllTests.php
index f3405613..f9ba1ddc 100644
--- a/tests/unit/Data/DataGateway/AllTests.php
+++ b/tests/unit/Data/DataGateway/AllTests.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../phpunit.php';
+
if(!defined('PHPUnit_MAIN_METHOD')) {
define('PHPUnit_MAIN_METHOD', 'Data_DataGateway_AllTests::main');
diff --git a/tests/unit/Data/DataGateway/TSqlCriteriaTest.php b/tests/unit/Data/DataGateway/TSqlCriteriaTest.php
index 043520e7..fb9c72b2 100644
--- a/tests/unit/Data/DataGateway/TSqlCriteriaTest.php
+++ b/tests/unit/Data/DataGateway/TSqlCriteriaTest.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../phpunit.php';
+
Prado::using('System.Data.DataGateway.TSqlCriteria');
diff --git a/tests/unit/Data/SqlMap/AllTests.php b/tests/unit/Data/SqlMap/AllTests.php
index 2f820f83..3adaa29c 100644
--- a/tests/unit/Data/SqlMap/AllTests.php
+++ b/tests/unit/Data/SqlMap/AllTests.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../phpunit.php';
+
if(!defined('PHPUnit_MAIN_METHOD')) {
define('PHPUnit_MAIN_METHOD', 'Data_SqlMap_AllTests::main');
diff --git a/tests/unit/Data/SqlMap/DataMapper/AllTests.php b/tests/unit/Data/SqlMap/DataMapper/AllTests.php
index 9e80e7c8..47b8522f 100644
--- a/tests/unit/Data/SqlMap/DataMapper/AllTests.php
+++ b/tests/unit/Data/SqlMap/DataMapper/AllTests.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../../phpunit.php';
+
if(!defined('PHPUnit_MAIN_METHOD')) {
define('PHPUnit_MAIN_METHOD', 'Data_SqlMap_DataMapper_AllTests::main');
diff --git a/tests/unit/Data/SqlMap/DataMapper/TPropertyAccessTest.php b/tests/unit/Data/SqlMap/DataMapper/TPropertyAccessTest.php
index b48363f1..61747c6b 100644
--- a/tests/unit/Data/SqlMap/DataMapper/TPropertyAccessTest.php
+++ b/tests/unit/Data/SqlMap/DataMapper/TPropertyAccessTest.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../../phpunit.php';
+
Prado::using('System.Data.SqlMap.DataMapper.TSqlMapException');
Prado::using('System.Data.SqlMap.DataMapper.TPropertyAccess');
diff --git a/tests/unit/Data/SqlMap/DynamicParameterTest.php b/tests/unit/Data/SqlMap/DynamicParameterTest.php
index 0bd5334e..64f5e35c 100644
--- a/tests/unit/Data/SqlMap/DynamicParameterTest.php
+++ b/tests/unit/Data/SqlMap/DynamicParameterTest.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../phpunit.php';
+
Prado::using('System.Data.*');
Prado::using('System.Data.SqlMap.*');
diff --git a/tests/unit/I18N/core/AllTests.php b/tests/unit/I18N/core/AllTests.php
index 66c8a6f2..43bbdb36 100644
--- a/tests/unit/I18N/core/AllTests.php
+++ b/tests/unit/I18N/core/AllTests.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../phpunit.php';
+
if(!defined('PHPUnit_MAIN_METHOD')) {
define('PHPUnit_MAIN_METHOD', 'I18N_core_AllTests::main');
diff --git a/tests/unit/I18N/core/CultureInfoTest.php b/tests/unit/I18N/core/CultureInfoTest.php
index c043edd7..0a96639f 100644
--- a/tests/unit/I18N/core/CultureInfoTest.php
+++ b/tests/unit/I18N/core/CultureInfoTest.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../phpunit.php';
+
Prado::using('System.I18N.core.CultureInfo');
diff --git a/tests/unit/I18N/core/DateFormatTest.php b/tests/unit/I18N/core/DateFormatTest.php
index da7c6b73..8015bd74 100644
--- a/tests/unit/I18N/core/DateFormatTest.php
+++ b/tests/unit/I18N/core/DateFormatTest.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../phpunit.php';
+
Prado::using('System.I18N.core.DateFormat');
diff --git a/tests/unit/I18N/core/DateTimeFormatInfoTest.php b/tests/unit/I18N/core/DateTimeFormatInfoTest.php
index 789329ce..442a6b85 100644
--- a/tests/unit/I18N/core/DateTimeFormatInfoTest.php
+++ b/tests/unit/I18N/core/DateTimeFormatInfoTest.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../phpunit.php';
+
Prado::using('System.I18N.core.DateTimeFormatInfo');
diff --git a/tests/unit/I18N/core/NumberFormatInfoTest.php b/tests/unit/I18N/core/NumberFormatInfoTest.php
index e01ba43e..d522144f 100644
--- a/tests/unit/I18N/core/NumberFormatInfoTest.php
+++ b/tests/unit/I18N/core/NumberFormatInfoTest.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../phpunit.php';
+
//NOTE: This page require UTF-8 aware editors
Prado::using('System.I18N.core.NumberFormatInfo');
diff --git a/tests/unit/I18N/core/NumberFormatTest.php b/tests/unit/I18N/core/NumberFormatTest.php
index 07d0d9ca..6a6f2dd0 100644
--- a/tests/unit/I18N/core/NumberFormatTest.php
+++ b/tests/unit/I18N/core/NumberFormatTest.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../phpunit.php';
+
//NOTE: This page require UTF-8 aware editors
Prado::using('System.I18N.core.NumberFormat');
diff --git a/tests/unit/IO/AllTests.php b/tests/unit/IO/AllTests.php
index b6871e23..01bbd95d 100644
--- a/tests/unit/IO/AllTests.php
+++ b/tests/unit/IO/AllTests.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
if(!defined('PHPUnit_MAIN_METHOD')) {
define('PHPUnit_MAIN_METHOD', 'IO_AllTests::main');
diff --git a/tests/unit/IO/TTarFileExtractorTest.php b/tests/unit/IO/TTarFileExtractorTest.php
index 6742fcf5..66b66831 100644
--- a/tests/unit/IO/TTarFileExtractorTest.php
+++ b/tests/unit/IO/TTarFileExtractorTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.IO.TTarFileExtractor');
diff --git a/tests/unit/IO/TTextWriterTest.php b/tests/unit/IO/TTextWriterTest.php
index c011acae..d23fec36 100644
--- a/tests/unit/IO/TTextWriterTest.php
+++ b/tests/unit/IO/TTextWriterTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.IO.TTextWriter');
diff --git a/tests/unit/Security/AllTests.php b/tests/unit/Security/AllTests.php
index 7de0996f..40316719 100644
--- a/tests/unit/Security/AllTests.php
+++ b/tests/unit/Security/AllTests.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
if(!defined('PHPUnit_MAIN_METHOD')) {
define('PHPUnit_MAIN_METHOD', 'Security_AllTests::main');
diff --git a/tests/unit/Security/TAuthManagerTest.php b/tests/unit/Security/TAuthManagerTest.php
index 7e628a61..03244a22 100644
--- a/tests/unit/Security/TAuthManagerTest.php
+++ b/tests/unit/Security/TAuthManagerTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.Security.TAuthManager');
Prado::using('System.Security.TUserManager');
diff --git a/tests/unit/Security/TAuthorizationRuleTest.php b/tests/unit/Security/TAuthorizationRuleTest.php
index e20542dc..5d5f2d97 100644
--- a/tests/unit/Security/TAuthorizationRuleTest.php
+++ b/tests/unit/Security/TAuthorizationRuleTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.Security.TAuthorizationRule');
diff --git a/tests/unit/Security/TSecurityManagerTest.php b/tests/unit/Security/TSecurityManagerTest.php
index d265d127..09c261cf 100644
--- a/tests/unit/Security/TSecurityManagerTest.php
+++ b/tests/unit/Security/TSecurityManagerTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.Security.TSecurityManager');
diff --git a/tests/unit/Security/TUserManagerTest.php b/tests/unit/Security/TUserManagerTest.php
index 2952927b..edb7ea6f 100644
--- a/tests/unit/Security/TUserManagerTest.php
+++ b/tests/unit/Security/TUserManagerTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.Security.TUserManager');
diff --git a/tests/unit/Security/TUserTest.php b/tests/unit/Security/TUserTest.php
index 597fac97..6fa337e0 100644
--- a/tests/unit/Security/TUserTest.php
+++ b/tests/unit/Security/TUserTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.Security.TUser');
Prado::using('System.Security.TUserManager');
diff --git a/tests/unit/TComponentTest.php b/tests/unit/TComponentTest.php
index 25292c0d..ff411954 100644
--- a/tests/unit/TComponentTest.php
+++ b/tests/unit/TComponentTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/phpunit.php';
class NewComponent extends TComponent {
private $_object = null;
diff --git a/tests/unit/Util/AllTests.php b/tests/unit/Util/AllTests.php
index 4a9ce809..8ab99a50 100644
--- a/tests/unit/Util/AllTests.php
+++ b/tests/unit/Util/AllTests.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
if(!defined('PHPUnit_MAIN_METHOD')) {
define('PHPUnit_MAIN_METHOD', 'Util_AllTests::main');
diff --git a/tests/unit/Util/TDateTimeStampTest.php b/tests/unit/Util/TDateTimeStampTest.php
index 60ccf640..6ae4b128 100644
--- a/tests/unit/Util/TDateTimeStampTest.php
+++ b/tests/unit/Util/TDateTimeStampTest.php
@@ -1,6 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.Util.TDateTimeStamp');
diff --git a/tests/unit/Util/TLoggerTest.php b/tests/unit/Util/TLoggerTest.php
index 4da5aaa1..49d5d316 100644
--- a/tests/unit/Util/TLoggerTest.php
+++ b/tests/unit/Util/TLoggerTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.Util.TLogger');
diff --git a/tests/unit/Util/TSimpleDateFormatterTest.php b/tests/unit/Util/TSimpleDateFormatterTest.php
index bfda4712..b989fcf5 100644
--- a/tests/unit/Util/TSimpleDateFormatterTest.php
+++ b/tests/unit/Util/TSimpleDateFormatterTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.Util.TSimpleDateFormatter');
diff --git a/tests/unit/Web/AllTests.php b/tests/unit/Web/AllTests.php
index 0b5752ba..f9b3b91d 100644
--- a/tests/unit/Web/AllTests.php
+++ b/tests/unit/Web/AllTests.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
if(!defined('PHPUnit_MAIN_METHOD')) {
define('PHPUnit_MAIN_METHOD', 'Web_AllTests::main');
diff --git a/tests/unit/Web/TAssetManagerTest.php b/tests/unit/Web/TAssetManagerTest.php
index f5485822..89349a0d 100644
--- a/tests/unit/Web/TAssetManagerTest.php
+++ b/tests/unit/Web/TAssetManagerTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.Web.TAssetManager');
diff --git a/tests/unit/Web/TCacheHttpSessionTest.php b/tests/unit/Web/TCacheHttpSessionTest.php
index 77f336fa..15c2a382 100644
--- a/tests/unit/Web/TCacheHttpSessionTest.php
+++ b/tests/unit/Web/TCacheHttpSessionTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.Web.TCacheHttpSession');
Prado::using('System.Caching.TMemCache');
diff --git a/tests/unit/Web/THttpCookieCollectionTest.php b/tests/unit/Web/THttpCookieCollectionTest.php
index 5af12736..68ea8777 100644
--- a/tests/unit/Web/THttpCookieCollectionTest.php
+++ b/tests/unit/Web/THttpCookieCollectionTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.Web.THttpRequest');
diff --git a/tests/unit/Web/THttpCookieTest.php b/tests/unit/Web/THttpCookieTest.php
index 0d6ade09..31d8e572 100644
--- a/tests/unit/Web/THttpCookieTest.php
+++ b/tests/unit/Web/THttpCookieTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.Web.THttpRequest');
diff --git a/tests/unit/Web/THttpRequestTest.php b/tests/unit/Web/THttpRequestTest.php
index a5f17f01..1807bbe2 100644
--- a/tests/unit/Web/THttpRequestTest.php
+++ b/tests/unit/Web/THttpRequestTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.Web.THttpRequest');
Prado::using('System.Security.TSecurityManager');
diff --git a/tests/unit/Web/THttpResponseTest.php b/tests/unit/Web/THttpResponseTest.php
index ac5d3751..dadbd768 100644
--- a/tests/unit/Web/THttpResponseTest.php
+++ b/tests/unit/Web/THttpResponseTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.Web.THttpResponse');
diff --git a/tests/unit/Web/THttpSessionTest.php b/tests/unit/Web/THttpSessionTest.php
index 179d2903..7de0f8a5 100644
--- a/tests/unit/Web/THttpSessionTest.php
+++ b/tests/unit/Web/THttpSessionTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.Web.THttpSession');
diff --git a/tests/unit/Web/THttpUtilityTest.php b/tests/unit/Web/THttpUtilityTest.php
index b7181978..85fcf7f4 100644
--- a/tests/unit/Web/THttpUtilityTest.php
+++ b/tests/unit/Web/THttpUtilityTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.Web.THttpUtility');
diff --git a/tests/unit/Web/TUriTest.php b/tests/unit/Web/TUriTest.php
index 7fbc8798..a8c65b9e 100644
--- a/tests/unit/Web/TUriTest.php
+++ b/tests/unit/Web/TUriTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.Web.THttpRequest');
diff --git a/tests/unit/Web/UI/ActiveControls/AllTests.php b/tests/unit/Web/UI/ActiveControls/AllTests.php
index 55c4331d..ef2dfb91 100644
--- a/tests/unit/Web/UI/ActiveControls/AllTests.php
+++ b/tests/unit/Web/UI/ActiveControls/AllTests.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../../phpunit.php';
+
if(!defined('PHPUnit_MAIN_METHOD')) {
define('PHPUnit_MAIN_METHOD', 'Web_UI_ActiveControls_AllTests::main');
diff --git a/tests/unit/Web/UI/ActiveControls/TActiveHiddenFieldTest.php b/tests/unit/Web/UI/ActiveControls/TActiveHiddenFieldTest.php
index f5e9d6fe..58821747 100644
--- a/tests/unit/Web/UI/ActiveControls/TActiveHiddenFieldTest.php
+++ b/tests/unit/Web/UI/ActiveControls/TActiveHiddenFieldTest.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../../phpunit.php';
+
Prado::using('System.Web.UI.ActiveControls.TActiveHiddenField');
diff --git a/tests/unit/Web/UI/AllTests.php b/tests/unit/Web/UI/AllTests.php
index 3bf389d5..71b088e4 100644
--- a/tests/unit/Web/UI/AllTests.php
+++ b/tests/unit/Web/UI/AllTests.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../phpunit.php';
+
if(!defined('PHPUnit_MAIN_METHOD')) {
define('PHPUnit_MAIN_METHOD', 'Web_UI_AllTests::main');
diff --git a/tests/unit/Web/UI/TClientScriptManagerTest.php b/tests/unit/Web/UI/TClientScriptManagerTest.php
index 4c41c69b..ea360f91 100644
--- a/tests/unit/Web/UI/TClientScriptManagerTest.php
+++ b/tests/unit/Web/UI/TClientScriptManagerTest.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../phpunit.php';
+
Prado::using('System.Web.UI.TClientScriptManager');
diff --git a/tests/unit/Web/UI/TControlAdapterTest.php b/tests/unit/Web/UI/TControlAdapterTest.php
index 9ae20a49..2a173fd8 100644
--- a/tests/unit/Web/UI/TControlAdapterTest.php
+++ b/tests/unit/Web/UI/TControlAdapterTest.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../phpunit.php';
+
Prado::using('System.Web.UI.TControlAdapter');
diff --git a/tests/unit/Web/UI/TControlTest.php b/tests/unit/Web/UI/TControlTest.php
index 9597c23e..670926be 100644
--- a/tests/unit/Web/UI/TControlTest.php
+++ b/tests/unit/Web/UI/TControlTest.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../phpunit.php';
+
Prado::using('System.Web.UI.TControl');
diff --git a/tests/unit/Web/UI/TFormTest.php b/tests/unit/Web/UI/TFormTest.php
index e2f312d6..74cbdb59 100644
--- a/tests/unit/Web/UI/TFormTest.php
+++ b/tests/unit/Web/UI/TFormTest.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../phpunit.php';
+
Prado::using('System.Web.UI.TForm');
diff --git a/tests/unit/Web/UI/THtmlWriterTest.php b/tests/unit/Web/UI/THtmlWriterTest.php
index ddbdabcf..080e2e26 100644
--- a/tests/unit/Web/UI/THtmlWriterTest.php
+++ b/tests/unit/Web/UI/THtmlWriterTest.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../phpunit.php';
+
Prado::using('System.Web.UI.THtmlWriter');
diff --git a/tests/unit/Web/UI/TPageStatePersisterTest.php b/tests/unit/Web/UI/TPageStatePersisterTest.php
index 02a2df2b..2734b142 100644
--- a/tests/unit/Web/UI/TPageStatePersisterTest.php
+++ b/tests/unit/Web/UI/TPageStatePersisterTest.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../phpunit.php';
+
Prado::using('System.Web.UI.TPageStatePersister');
diff --git a/tests/unit/Web/UI/TPageTest.php b/tests/unit/Web/UI/TPageTest.php
index 6f7f8268..d6f689e9 100644
--- a/tests/unit/Web/UI/TPageTest.php
+++ b/tests/unit/Web/UI/TPageTest.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../phpunit.php';
+
Prado::using('System.Web.UI.TPage');
diff --git a/tests/unit/Web/UI/TSessionPageStatePersisterTest.php b/tests/unit/Web/UI/TSessionPageStatePersisterTest.php
index 1422c4c7..b8758b30 100644
--- a/tests/unit/Web/UI/TSessionPageStatePersisterTest.php
+++ b/tests/unit/Web/UI/TSessionPageStatePersisterTest.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../phpunit.php';
+
Prado::using('System.Web.UI.TSessionPageStatePersister');
diff --git a/tests/unit/Web/UI/TTemplateControlTest.php b/tests/unit/Web/UI/TTemplateControlTest.php
index a4468fd6..97ea8c1d 100644
--- a/tests/unit/Web/UI/TTemplateControlTest.php
+++ b/tests/unit/Web/UI/TTemplateControlTest.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../phpunit.php';
+
Prado::using('System.Web.UI.TTemplateControl');
diff --git a/tests/unit/Web/UI/TTemplateManagerTest.php b/tests/unit/Web/UI/TTemplateManagerTest.php
index e8479ef9..46c17538 100644
--- a/tests/unit/Web/UI/TTemplateManagerTest.php
+++ b/tests/unit/Web/UI/TTemplateManagerTest.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../phpunit.php';
+
Prado::using('System.Web.UI.TTemplateManager');
diff --git a/tests/unit/Web/UI/TTemplateTest.php b/tests/unit/Web/UI/TTemplateTest.php
index bfd4f1f4..2bb6599b 100644
--- a/tests/unit/Web/UI/TTemplateTest.php
+++ b/tests/unit/Web/UI/TTemplateTest.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../phpunit.php';
+
Prado::using('System.Web.UI.TTemplateManager');
diff --git a/tests/unit/Web/UI/TThemeManagerTest.php b/tests/unit/Web/UI/TThemeManagerTest.php
index 7db1bd38..1a514d2b 100644
--- a/tests/unit/Web/UI/TThemeManagerTest.php
+++ b/tests/unit/Web/UI/TThemeManagerTest.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../phpunit.php';
+
Prado::using('System.Web.UI.TThemeManager');
diff --git a/tests/unit/Web/UI/TThemeTest.php b/tests/unit/Web/UI/TThemeTest.php
index e007cc49..e7fa376d 100644
--- a/tests/unit/Web/UI/TThemeTest.php
+++ b/tests/unit/Web/UI/TThemeTest.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../phpunit.php';
+
Prado::using('System.Web.UI.TThemeManager');
diff --git a/tests/unit/Web/UI/WebControls/AllTests.php b/tests/unit/Web/UI/WebControls/AllTests.php
index f9b188c2..7d0b1632 100644
--- a/tests/unit/Web/UI/WebControls/AllTests.php
+++ b/tests/unit/Web/UI/WebControls/AllTests.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../../phpunit.php';
+
if(!defined('PHPUnit_MAIN_METHOD')) {
define('PHPUnit_MAIN_METHOD', 'Web_UI_WebControls_AllTests::main');
diff --git a/tests/unit/Web/UI/WebControls/TDropDownListTest.php b/tests/unit/Web/UI/WebControls/TDropDownListTest.php
index 98ff1dd2..503466fe 100644
--- a/tests/unit/Web/UI/WebControls/TDropDownListTest.php
+++ b/tests/unit/Web/UI/WebControls/TDropDownListTest.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../../phpunit.php';
+
Prado::using('System.Web.UI.WebControls.TDropDownList');
diff --git a/tests/unit/Web/UI/WebControls/TLabelTest.php b/tests/unit/Web/UI/WebControls/TLabelTest.php
index 214d497c..0e5577d5 100644
--- a/tests/unit/Web/UI/WebControls/TLabelTest.php
+++ b/tests/unit/Web/UI/WebControls/TLabelTest.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../../phpunit.php';
+
Prado::using('System.Web.UI.WebControls.TLabel');
Prado::using('System.Web.UI.THtmlWriter');
diff --git a/tests/unit/Web/UI/WebControls/TRequiredFieldValidatorTest.php b/tests/unit/Web/UI/WebControls/TRequiredFieldValidatorTest.php
index e84b3cf3..894c3899 100644
--- a/tests/unit/Web/UI/WebControls/TRequiredFieldValidatorTest.php
+++ b/tests/unit/Web/UI/WebControls/TRequiredFieldValidatorTest.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../../phpunit.php';
+
Prado::using('System.Web.UI.WebControls.TRequiredFieldValidator');
diff --git a/tests/unit/Web/UI/WebControls/TXmlTransformTest.php b/tests/unit/Web/UI/WebControls/TXmlTransformTest.php
index 9fc6d769..6c6d9456 100644
--- a/tests/unit/Web/UI/WebControls/TXmlTransformTest.php
+++ b/tests/unit/Web/UI/WebControls/TXmlTransformTest.php
@@ -1,5 +1,5 @@
<?php
-require_once dirname(__FILE__).'/../../../phpunit.php';
+
Prado::using('System.Web.UI.WebControls.TXmlTransform');
Prado::using('System.Web.UI.THtmlWriter');
diff --git a/tests/unit/Xml/AllTests.php b/tests/unit/Xml/AllTests.php
index 10658d42..d934786b 100644
--- a/tests/unit/Xml/AllTests.php
+++ b/tests/unit/Xml/AllTests.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
if(!defined('PHPUnit_MAIN_METHOD')) {
define('PHPUnit_MAIN_METHOD', 'Xml_AllTests::main');
diff --git a/tests/unit/Xml/TXmlDocumentTest.php b/tests/unit/Xml/TXmlDocumentTest.php
index 8766b231..2ab95641 100644
--- a/tests/unit/Xml/TXmlDocumentTest.php
+++ b/tests/unit/Xml/TXmlDocumentTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.Xml.TXmlDocument');
diff --git a/tests/unit/Xml/TXmlElementListTest.php b/tests/unit/Xml/TXmlElementListTest.php
index 16384078..b124dfbe 100644
--- a/tests/unit/Xml/TXmlElementListTest.php
+++ b/tests/unit/Xml/TXmlElementListTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.Xml.TXmlDocument');
diff --git a/tests/unit/Xml/TXmlElementTest.php b/tests/unit/Xml/TXmlElementTest.php
index ec560a1c..d7b86832 100644
--- a/tests/unit/Xml/TXmlElementTest.php
+++ b/tests/unit/Xml/TXmlElementTest.php
@@ -1,5 +1,4 @@
<?php
-require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.Xml.TXmlDocument');
diff --git a/tests/unit/phpunit.php b/tests/unit/bootstrap.php
index f6338237..97836012 100644
--- a/tests/unit/phpunit.php
+++ b/tests/unit/bootstrap.php
@@ -2,17 +2,19 @@
/**
* A few common settings for all unit tests.
*
- * This file should be included in all unit tests with absolute path to be able to run it
- * from the command line with "phpunit" like this:
- *
- * require_once dirname(__FILE__).'/path/../to/../phpunit.php';
- *
* Also remember do define the @package attribute for your test class to make it appear under
* the right package in unit test and code coverage reports.
*/
define('PRADO_TEST_RUN', true);
define('PRADO_FRAMEWORK_DIR', dirname(__FILE__).'/../../framework');
+define('VENDOR_DIR', dirname(__FILE__).'/../../vendor');
set_include_path(PRADO_FRAMEWORK_DIR.PATH_SEPARATOR.get_include_path());
+if (!@include_once VENDOR_DIR.'/autoload.php') {
+ die('You must set up the project dependencies, run the following commands:
+ wget http://getcomposer.org/composer.phar
+ php composer.phar install');
+}
+
require_once(PRADO_FRAMEWORK_DIR.'/prado.php'); \ No newline at end of file