Modified: trunk/PersistentObject/tests/suite.php
==============================================================================
--- trunk/PersistentObject/tests/suite.php [iso-8859-1] (original)
+++ trunk/PersistentObject/tests/suite.php [iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -7,7 +7,6 @@
* @package PersistentObject
* @subpackage Tests
*/
-ezcTestRunner::addFileToFilter( __FILE__ );
/**
* Including the tests
Modified: trunk/PersistentObjectDatabaseSchemaTiein/tests/data.php
==============================================================================
--- trunk/PersistentObjectDatabaseSchemaTiein/tests/data.php [iso-8859-1]
(original)
+++ trunk/PersistentObjectDatabaseSchemaTiein/tests/data.php [iso-8859-1] Mon
Jul 2 12:02:22 2007
@@ -1,6 +1,4 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
$res["testUnusualCall"] = '[34;1meZ components PersistentObject definition
generator[0m[m
[0m[0m[0m[m
[0m[31;1mError while processing your options: Argument with name \'def dir\'
is mandatory
Modified: trunk/SignalSlot/tests/test_classes.php
==============================================================================
--- trunk/SignalSlot/tests/test_classes.php [iso-8859-1] (original)
+++ trunk/SignalSlot/tests/test_classes.php [iso-8859-1] Mon Jul 2 12:02:22
2007
@@ -7,8 +7,6 @@
* @package SignalSlot
* @subpackage Tests
*/
-
-ezcTestRunner::addFileToFilter( __FILE__ );
/**
* Wrapper of normal static connection class. This is because we can't reset
it to NULL after it has been set in SignalCollection
Modified: trunk/Template/docs/examples/brainfuck/brainfuck.php
==============================================================================
--- trunk/Template/docs/examples/brainfuck/brainfuck.php [iso-8859-1] (original)
+++ trunk/Template/docs/examples/brainfuck/brainfuck.php [iso-8859-1] Mon Jul
2 12:02:22 2007
@@ -1,6 +1,4 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
/**
* PHP Brainf*ck compiler
* (c) Kristian Hole 2006
Modified:
trunk/Template/tests/compiled/full-14862b79ceaf01443626bd5d564c53e2.php
==============================================================================
--- trunk/Template/tests/compiled/full-14862b79ceaf01443626bd5d564c53e2.php
[iso-8859-1] (original)
+++ trunk/Template/tests/compiled/full-14862b79ceaf01443626bd5d564c53e2.php
[iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -1,5 +1,3 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
// Dummy PHP file for compiled code test
?>
Modified: trunk/Template/tests/cursor_test.php
==============================================================================
--- trunk/Template/tests/cursor_test.php [iso-8859-1] (original)
+++ trunk/Template/tests/cursor_test.php [iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -38,7 +38,7 @@
*/
public function testDefault()
{
- $receiver = $this->getAttribute( $this->defaultCursor, 'receiver' );
+ $receiver = $this->readAttribute( $this->defaultCursor, 'receiver' );
self::assertAttributeSame( "a simple line\nsecond line", 'text',
$receiver );
self::assertAttributeSame( 0, 'position', $receiver );
@@ -52,7 +52,7 @@
public function testInit()
{
$this->cursor = new Invariant_ezcTemplateCursor( "a simple
line\nsecond line", 18, 2, 4 );
- $receiver = $this->getAttribute( $this->cursor, 'receiver' );
+ $receiver = $this->readAttribute( $this->cursor, 'receiver' );
self::assertAttributeSame( "a simple line\nsecond line", 'text',
$receiver );
self::assertAttributeSame( 18, 'position', $receiver );
@@ -69,7 +69,7 @@
public function testGotoBeginning()
{
$this->cursor->gotoBeginning();
- $receiver = $this->getAttribute( $this->cursor, 'receiver' );
+ $receiver = $this->readAttribute( $this->cursor, 'receiver' );
self::assertAttributeSame( "a simple line\nsecond line", 'text',
$receiver );
self::assertAttributeSame( 0, 'position', $receiver );
@@ -86,7 +86,7 @@
public function testGotoEnd()
{
$this->cursor->gotoEnd();
- $receiver = $this->getAttribute( $this->cursor, 'receiver' );
+ $receiver = $this->readAttribute( $this->cursor, 'receiver' );
self::assertAttributeSame( "a simple line\nsecond line", 'text',
$receiver );
self::assertAttributeSame( 25, 'position', $receiver );
@@ -103,7 +103,7 @@
public function testGotoLineBeginning()
{
$this->cursor->gotoLineBeginning();
- $receiver = $this->getAttribute( $this->cursor, 'receiver' );
+ $receiver = $this->readAttribute( $this->cursor, 'receiver' );
self::assertAttributeSame( "a simple line\nsecond line", 'text',
$receiver );
self::assertAttributeSame( 14, 'position', $receiver );
@@ -115,7 +115,7 @@
// Second time should not change values
$this->cursor->gotoLineBeginning();
- $receiver = $this->getAttribute( $this->cursor, 'receiver' );
+ $receiver = $this->readAttribute( $this->cursor, 'receiver' );
self::assertAttributeSame( "a simple line\nsecond line", 'text',
$receiver );
self::assertAttributeSame( 14, 'position', $receiver );
@@ -132,7 +132,7 @@
public function testGotoLineEnd()
{
$this->cursor->gotoLineEnd();
- $receiver = $this->getAttribute( $this->cursor, 'receiver' );
+ $receiver = $this->readAttribute( $this->cursor, 'receiver' );
self::assertAttributeSame( "a simple line\nsecond line", 'text',
$receiver );
self::assertAttributeSame( 25, 'position', $receiver );
@@ -144,7 +144,7 @@
// Second time should not change values
$this->cursor->gotoLineEnd();
- $receiver = $this->getAttribute( $this->cursor, 'receiver' );
+ $receiver = $this->readAttribute( $this->cursor, 'receiver' );
self::assertAttributeSame( "a simple line\nsecond line", 'text',
$receiver );
self::assertAttributeSame( 25, 'position', $receiver );
@@ -161,40 +161,40 @@
public function testGotoLines()
{
$this->cursor->gotoLineBeginning();
- $receiver = $this->getAttribute( $this->cursor, 'receiver' );
-
- self::assertAttributeSame( "a simple line\nsecond line", 'text',
$receiver );
- self::assertAttributeSame( 14, 'position', $receiver );
- self::assertAttributeSame( 2, 'line', $receiver );
- self::assertAttributeSame( 0, 'column', $receiver );
-
- self::assertSame( false, $this->cursor->atBeginning(), "Function
atBeginning() did not return false." );
- self::assertSame( false, $this->cursor->atEnd(), "Function atEnd() did
not return false." );
-
- $this->cursor->gotoLineEnd();
- $receiver = $this->getAttribute( $this->cursor, 'receiver' );
-
- self::assertAttributeSame( "a simple line\nsecond line", 'text',
$receiver );
- self::assertAttributeSame( 25, 'position', $receiver );
- self::assertAttributeSame( 2, 'line', $receiver );
- self::assertAttributeSame( 11, 'column', $receiver );
-
- self::assertSame( false, $this->cursor->atBeginning(), "Function
atBeginning() did not return false." );
- self::assertSame( true, $this->cursor->atEnd(), "Function atEnd() did
not return false." );
-
- $this->cursor->gotoLineBeginning();
- $receiver = $this->getAttribute( $this->cursor, 'receiver' );
-
- self::assertAttributeSame( "a simple line\nsecond line", 'text',
$receiver );
- self::assertAttributeSame( 14, 'position', $receiver );
- self::assertAttributeSame( 2, 'line', $receiver );
- self::assertAttributeSame( 0, 'column', $receiver );
-
- self::assertSame( false, $this->cursor->atBeginning(), "Function
atBeginning() did not return false." );
- self::assertSame( false, $this->cursor->atEnd(), "Function atEnd() did
not return false." );
-
- $this->cursor->gotoLineEnd();
- $receiver = $this->getAttribute( $this->cursor, 'receiver' );
+ $receiver = $this->readAttribute( $this->cursor, 'receiver' );
+
+ self::assertAttributeSame( "a simple line\nsecond line", 'text',
$receiver );
+ self::assertAttributeSame( 14, 'position', $receiver );
+ self::assertAttributeSame( 2, 'line', $receiver );
+ self::assertAttributeSame( 0, 'column', $receiver );
+
+ self::assertSame( false, $this->cursor->atBeginning(), "Function
atBeginning() did not return false." );
+ self::assertSame( false, $this->cursor->atEnd(), "Function atEnd() did
not return false." );
+
+ $this->cursor->gotoLineEnd();
+ $receiver = $this->readAttribute( $this->cursor, 'receiver' );
+
+ self::assertAttributeSame( "a simple line\nsecond line", 'text',
$receiver );
+ self::assertAttributeSame( 25, 'position', $receiver );
+ self::assertAttributeSame( 2, 'line', $receiver );
+ self::assertAttributeSame( 11, 'column', $receiver );
+
+ self::assertSame( false, $this->cursor->atBeginning(), "Function
atBeginning() did not return false." );
+ self::assertSame( true, $this->cursor->atEnd(), "Function atEnd() did
not return false." );
+
+ $this->cursor->gotoLineBeginning();
+ $receiver = $this->readAttribute( $this->cursor, 'receiver' );
+
+ self::assertAttributeSame( "a simple line\nsecond line", 'text',
$receiver );
+ self::assertAttributeSame( 14, 'position', $receiver );
+ self::assertAttributeSame( 2, 'line', $receiver );
+ self::assertAttributeSame( 0, 'column', $receiver );
+
+ self::assertSame( false, $this->cursor->atBeginning(), "Function
atBeginning() did not return false." );
+ self::assertSame( false, $this->cursor->atEnd(), "Function atEnd() did
not return false." );
+
+ $this->cursor->gotoLineEnd();
+ $receiver = $this->readAttribute( $this->cursor, 'receiver' );
self::assertAttributeSame( "a simple line\nsecond line", 'text',
$receiver );
self::assertAttributeSame( 25, 'position', $receiver );
@@ -211,7 +211,7 @@
/* public function testGotoPosition()
{
$this->cursor->gotoPosition( 14 );
- $receiver = $this->getAttribute( $this->cursor, 'receiver' );
+ $receiver = $this->readAttribute( $this->cursor, 'receiver' );
self::assertAttributeSame( "a simple line\nsecond line", 'text',
$receiver );
self::assertAttributeSame( 14, 'position', $receiver );
@@ -219,7 +219,7 @@
self::assertAttributeSame( 0, 'column', $receiver );
$this->cursor->gotoPosition( 4 );
- $receiver = $this->getAttribute( $this->cursor, 'receiver' );
+ $receiver = $this->readAttribute( $this->cursor, 'receiver' );
self::assertAttributeSame( "a simple line\nsecond line", 'text',
$receiver );
self::assertAttributeSame( 4, 'position', $receiver );
@@ -228,7 +228,7 @@
// test moving to the start
$this->cursor->gotoPosition( 0 );
- $receiver = $this->getAttribute( $this->cursor, 'receiver' );
+ $receiver = $this->readAttribute( $this->cursor, 'receiver' );
self::assertAttributeSame( "a simple line\nsecond line", 'text',
$receiver );
self::assertAttributeSame( 0, 'position', $receiver );
@@ -237,7 +237,7 @@
// same again
$this->cursor->gotoPosition( 0 );
- $receiver = $this->getAttribute( $this->cursor, 'receiver' );
+ $receiver = $this->readAttribute( $this->cursor, 'receiver' );
self::assertAttributeSame( "a simple line\nsecond line", 'text',
$receiver );
self::assertAttributeSame( 0, 'position', $receiver );
@@ -252,7 +252,7 @@
{
$subText = $this->cursor->substring();
$current = $this->cursor->current();
- $receiver = $this->getAttribute( $this->cursor, 'receiver' );
+ $receiver = $this->readAttribute( $this->cursor, 'receiver' );
self::assertAttributeSame( "a simple line\nsecond line", 'text',
$receiver );
self::assertAttributeSame( 18, 'position', $receiver );
@@ -265,7 +265,7 @@
$this->cursor->gotoEnd();
$subText = $this->cursor->substring();
$current = $this->cursor->current();
- $receiver = $this->getAttribute( $this->cursor, 'receiver' );
+ $receiver = $this->readAttribute( $this->cursor, 'receiver' );
self::assertAttributeSame( "a simple line\nsecond line", 'text',
$receiver );
self::assertAttributeSame( 25, 'position', $receiver );
@@ -278,7 +278,7 @@
$this->cursor->gotoBeginning();
$subText = $this->cursor->substring();
$current = $this->cursor->current();
- $receiver = $this->getAttribute( $this->cursor, 'receiver' );
+ $receiver = $this->readAttribute( $this->cursor, 'receiver' );
self::assertAttributeSame( "a simple line\nsecond line", 'text',
$receiver );
self::assertAttributeSame( 0, 'position', $receiver );
Modified: trunk/Template/tests/custom_blocks/cblock.php
==============================================================================
--- trunk/Template/tests/custom_blocks/cblock.php [iso-8859-1] (original)
+++ trunk/Template/tests/custom_blocks/cblock.php [iso-8859-1] Mon Jul 2
12:02:22 2007
@@ -1,6 +1,4 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
class cblockTemplateExtension implements ezcTemplateCustomBlock
{
public static function getCustomBlockDefinition( $name )
Modified: trunk/Template/tests/custom_blocks/links.php
==============================================================================
--- trunk/Template/tests/custom_blocks/links.php [iso-8859-1] (original)
+++ trunk/Template/tests/custom_blocks/links.php [iso-8859-1] Mon Jul 2
12:02:22 2007
@@ -1,6 +1,4 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
class LinksCustomBlock implements ezcTemplateCustomFunction,
ezcTemplateCustomBlock
{
public static function getCustomFunctionDefinition($name)
Modified: trunk/Template/tests/custom_blocks/sha1.php
==============================================================================
--- trunk/Template/tests/custom_blocks/sha1.php [iso-8859-1] (original)
+++ trunk/Template/tests/custom_blocks/sha1.php [iso-8859-1] Mon Jul 2
12:02:22 2007
@@ -1,6 +1,4 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
class Sha1CustomBlock implements ezcTemplateCustomFunction
{
public static function getCustomFunctionDefinition($name)
Modified: trunk/Template/tests/custom_blocks/testblocks.php
==============================================================================
--- trunk/Template/tests/custom_blocks/testblocks.php [iso-8859-1] (original)
+++ trunk/Template/tests/custom_blocks/testblocks.php [iso-8859-1] Mon Jul 2
12:02:22 2007
@@ -1,6 +1,4 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
class TestBlocks implements ezcTemplateCustomBlock, ezcTemplateCustomFunction
{
public static function getCustomFunctionDefinition( $name )
Modified: trunk/Template/tests/db_cache_manager.php
==============================================================================
--- trunk/Template/tests/db_cache_manager.php [iso-8859-1] (original)
+++ trunk/Template/tests/db_cache_manager.php [iso-8859-1] Mon Jul 2 12:02:22
2007
@@ -1,6 +1,4 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
class DbCacheManager implements ezcTemplateCacheManager
{
protected $keys = array();
Modified: trunk/Template/tests/invariant_parse_cursor.php
==============================================================================
--- trunk/Template/tests/invariant_parse_cursor.php [iso-8859-1] (original)
+++ trunk/Template/tests/invariant_parse_cursor.php [iso-8859-1] Mon Jul 2
12:02:22 2007
@@ -1,6 +1,4 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
/**
* @copyright Copyright (C) 2005-2007 eZ systems as. All rights reserved.
* @license LGPL [EMAIL PROTECTED] http://www.gnu.org/copyleft/lesser.html}
Modified: trunk/Template/tests/locale_test.php
==============================================================================
--- trunk/Template/tests/locale_test.php [iso-8859-1] (original)
+++ trunk/Template/tests/locale_test.php [iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -14,8 +14,6 @@
*/
class ezcTemplateLocaleTest extends ezcTestCase
{
- protected $originalLocale;
-
public static function suite()
{
return new PHPUnit_Framework_TestSuite( __CLASS__ );
@@ -34,18 +32,12 @@
$config->templatePath = $this->templatePath;
$config->compilePath = $this->compilePath;
$config->context = new ezcTemplateNoContext;
-
- $this->originalLocale = setlocale(LC_ALL, 0);
- }
-
- protected function tearDown()
- {
- setlocale( LC_ALL, $this->originalLocale );
}
public function testLocale()
{
- setlocale( LC_ALL, 'de_DE', 'de_DE.UTF-8', 'deu', 'german' );
+ $this->setLocale( LC_ALL, 'de_DE', 'de_DE.UTF-8', 'deu', 'german' );
+
$a = 3.4;
$this->assertEquals("3,4", (string)$a);
}
@@ -53,7 +45,8 @@
public function testFloats()
{
- setlocale( LC_ALL, 'de_DE' );
+ $this->setLocale( LC_ALL, 'de_DE' );
+
$template = new ezcTemplate();
$file = "float.ezt";
@@ -62,6 +55,4 @@
$this->assertEquals(1, $template->process( $file), "Number 3.14 is
internally translated to 3,14 when the de_DE locale is used.");
}
}
-
-
?>
Modified: trunk/Template/tests/override.php
==============================================================================
--- trunk/Template/tests/override.php [iso-8859-1] (original)
+++ trunk/Template/tests/override.php [iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -1,7 +1,4 @@
<?php
-
-ezcTestRunner::addFileToFilter( __FILE__ );
-
class OverrideCustomFunction implements ezcTemplateCustomFunction
{
public static function getCustomFunctionDefinition( $name )
Modified: trunk/Template/tests/regression_suite.php
==============================================================================
--- trunk/Template/tests/regression_suite.php [iso-8859-1] (original)
+++ trunk/Template/tests/regression_suite.php [iso-8859-1] Mon Jul 2 12:02:22
2007
@@ -52,8 +52,6 @@
{
throw new InvalidArgumentException;
}
-
- PHPUnit_Util_Filter::addFileToFilter( realpath(
$theClass->getFilename() ), 'TESTS' );
if ( $name != '' )
{
Modified:
trunk/Template/tests/regression_tests/array_fetch/correct/from_property.send
==============================================================================
---
trunk/Template/tests/regression_tests/array_fetch/correct/from_property.send
[iso-8859-1] (original)
+++
trunk/Template/tests/regression_tests/array_fetch/correct/from_property.send
[iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -1,6 +1,4 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
class Class8239
{
public $a;
Modified: trunk/Template/tests/regression_tests/custom_blocks/correct/sha1.send
==============================================================================
--- trunk/Template/tests/regression_tests/custom_blocks/correct/sha1.send
[iso-8859-1] (original)
+++ trunk/Template/tests/regression_tests/custom_blocks/correct/sha1.send
[iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -1,6 +1,4 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
$v = new ezcTemplateVariableCollection();
$v->text = "Text for SHA1";
Modified:
trunk/Template/tests/regression_tests/expressions/correct/array_fetch_with_property.send
==============================================================================
---
trunk/Template/tests/regression_tests/expressions/correct/array_fetch_with_property.send
[iso-8859-1] (original)
+++
trunk/Template/tests/regression_tests/expressions/correct/array_fetch_with_property.send
[iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -1,6 +1,4 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
class MyObj848483
{
public $property = "Hello world";
Modified:
trunk/Template/tests/regression_tests/expressions/correct/binary_operators_0019.send
==============================================================================
---
trunk/Template/tests/regression_tests/expressions/correct/binary_operators_0019.send
[iso-8859-1] (original)
+++
trunk/Template/tests/regression_tests/expressions/correct/binary_operators_0019.send
[iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -1,6 +1,4 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
if ( !class_exists( 'ezcTemplateTestBinOpMyClass', false ) )
{
class ezcTemplateTestBinOpMyClass
Modified:
trunk/Template/tests/regression_tests/expressions/correct/binary_operators_0037.send
==============================================================================
---
trunk/Template/tests/regression_tests/expressions/correct/binary_operators_0037.send
[iso-8859-1] (original)
+++
trunk/Template/tests/regression_tests/expressions/correct/binary_operators_0037.send
[iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -1,6 +1,4 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
if ( !class_exists( 'ezcTemplateTestBinOpMyClass', false ) )
{
class ezcTemplateTestBinOpMyClass
Modified:
trunk/Template/tests/regression_tests/expressions/correct/modifying_property_operators.send
==============================================================================
---
trunk/Template/tests/regression_tests/expressions/correct/modifying_property_operators.send
[iso-8859-1] (original)
+++
trunk/Template/tests/regression_tests/expressions/correct/modifying_property_operators.send
[iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -1,6 +1,4 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
if ( !class_exists( 'ezcTemplateTestModObjOpMySubClass', false ) )
{
class ezcTemplateTestModObjOpMySubClass
Modified:
trunk/Template/tests/regression_tests/functions/correct/array_functions.send
==============================================================================
---
trunk/Template/tests/regression_tests/functions/correct/array_functions.send
[iso-8859-1] (original)
+++
trunk/Template/tests/regression_tests/functions/correct/array_functions.send
[iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -1,8 +1,5 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
$v = new ezcTemplateVariableCollection();
-
$users = array();
Modified:
trunk/Template/tests/regression_tests/functions/correct/date_functions.send
==============================================================================
--- trunk/Template/tests/regression_tests/functions/correct/date_functions.send
[iso-8859-1] (original)
+++ trunk/Template/tests/regression_tests/functions/correct/date_functions.send
[iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -1,6 +1,4 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
$v = new ezcTemplateVariableCollection();
$v->timestamp = time();
Modified:
trunk/Template/tests/regression_tests/functions/correct/function_is_set.send
==============================================================================
---
trunk/Template/tests/regression_tests/functions/correct/function_is_set.send
[iso-8859-1] (original)
+++
trunk/Template/tests/regression_tests/functions/correct/function_is_set.send
[iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -1,6 +1,4 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
$v = new ezcTemplateVariableCollection();
$v->obj = new Blarp93093();
Modified:
trunk/Template/tests/regression_tests/functions/correct/type_functions.send
==============================================================================
--- trunk/Template/tests/regression_tests/functions/correct/type_functions.send
[iso-8859-1] (original)
+++ trunk/Template/tests/regression_tests/functions/correct/type_functions.send
[iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -1,6 +1,4 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
$v = new ezcTemplateVariableCollection();
$v->myTstStdObject = new StdClass();
$v->user = new RaysBeautifulClass;
Modified:
trunk/Template/tests/regression_tests/include/correct/receive_use_variable.send
==============================================================================
---
trunk/Template/tests/regression_tests/include/correct/receive_use_variable.send
[iso-8859-1] (original)
+++
trunk/Template/tests/regression_tests/include/correct/receive_use_variable.send
[iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -1,6 +1,4 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
$v = new ezcTemplateVariableCollection();
$v->number = 22;
Modified:
trunk/Template/tests/regression_tests/include/correct/send_expr_property.send
==============================================================================
---
trunk/Template/tests/regression_tests/include/correct/send_expr_property.send
[iso-8859-1] (original)
+++
trunk/Template/tests/regression_tests/include/correct/send_expr_property.send
[iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -1,6 +1,4 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
class MyFromClass1234
{
public $firstName = "Bernard";
Modified: trunk/Template/tests/regression_tests/return/correct/as.receive
==============================================================================
--- trunk/Template/tests/regression_tests/return/correct/as.receive
[iso-8859-1] (original)
+++ trunk/Template/tests/regression_tests/return/correct/as.receive
[iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -1,6 +1,4 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
$v = new ezcTemplateVariableCollection();
$v->b = 5;
Modified:
trunk/Template/tests/regression_tests/return/correct/expression.receive
==============================================================================
--- trunk/Template/tests/regression_tests/return/correct/expression.receive
[iso-8859-1] (original)
+++ trunk/Template/tests/regression_tests/return/correct/expression.receive
[iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -1,6 +1,4 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
$v = new ezcTemplateVariableCollection();
$v->six = 6;
Modified: trunk/Template/tests/regression_tests/return/correct/multiple.receive
==============================================================================
--- trunk/Template/tests/regression_tests/return/correct/multiple.receive
[iso-8859-1] (original)
+++ trunk/Template/tests/regression_tests/return/correct/multiple.receive
[iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -1,6 +1,4 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
$v = new ezcTemplateVariableCollection();
$v->a = 5;
$v->b = 6;
Modified: trunk/Template/tests/regression_tests/return/correct/return.receive
==============================================================================
--- trunk/Template/tests/regression_tests/return/correct/return.receive
[iso-8859-1] (original)
+++ trunk/Template/tests/regression_tests/return/correct/return.receive
[iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -1,6 +1,4 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
$v = new ezcTemplateVariableCollection();
$v->a = 5;
Modified: trunk/Template/tests/regression_tests/use/correct/default_values.send
==============================================================================
--- trunk/Template/tests/regression_tests/use/correct/default_values.send
[iso-8859-1] (original)
+++ trunk/Template/tests/regression_tests/use/correct/default_values.send
[iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -1,6 +1,4 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
$v = new ezcTemplateVariableCollection();
$v->a = "Hello";
Modified: trunk/Template/tests/regression_tests/use/correct/multi_prop.send
==============================================================================
--- trunk/Template/tests/regression_tests/use/correct/multi_prop.send
[iso-8859-1] (original)
+++ trunk/Template/tests/regression_tests/use/correct/multi_prop.send
[iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -1,6 +1,4 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
class MyFromClass
{
public $firstName = "Bernard";
Modified: trunk/Template/tests/regression_tests/use/correct/object.send
==============================================================================
--- trunk/Template/tests/regression_tests/use/correct/object.send [iso-8859-1]
(original)
+++ trunk/Template/tests/regression_tests/use/correct/object.send [iso-8859-1]
Mon Jul 2 12:02:22 2007
@@ -1,6 +1,4 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
class MyClassObjectTest
{
public $a = 5;
Modified: trunk/Template/tests/regression_tests/use/correct/prop_and_func.send
==============================================================================
--- trunk/Template/tests/regression_tests/use/correct/prop_and_func.send
[iso-8859-1] (original)
+++ trunk/Template/tests/regression_tests/use/correct/prop_and_func.send
[iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -1,6 +1,4 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
class MyFromClassBlaaaap
{
public $firstName = "Bernard";
Modified: trunk/Template/tests/regression_tests/use/incorrect/object.send
==============================================================================
--- trunk/Template/tests/regression_tests/use/incorrect/object.send
[iso-8859-1] (original)
+++ trunk/Template/tests/regression_tests/use/incorrect/object.send
[iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -1,6 +1,4 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
class MyClassObjectTestAadsfaasdf
{
public $a = 5;
Modified: trunk/UnitTest/src/constraint/image.php
==============================================================================
--- trunk/UnitTest/src/constraint/image.php [iso-8859-1] (original)
+++ trunk/UnitTest/src/constraint/image.php [iso-8859-1] Mon Jul 2 12:02:22
2007
@@ -7,8 +7,6 @@
* @copyright Copyright (C) 2005-2007 eZ systems as. All rights reserved.
* @license http://ez.no/licenses/new_bsd New BSD License
*/
-
-ezcTestRunner::addFileToFilter( __FILE__ );
/**
* Constraint for image comparison.
Modified: trunk/UnitTest/src/runtests.php
==============================================================================
--- trunk/UnitTest/src/runtests.php [iso-8859-1] (original)
+++ trunk/UnitTest/src/runtests.php [iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -24,6 +24,5 @@
ezcBase::autoload( $className );
}
-ezcTestRunner::addFileToFilter( __FILE__ );
ezcTestRunner::main();
?>
Modified: trunk/UnitTest/src/test/case.php
==============================================================================
--- trunk/UnitTest/src/test/case.php [iso-8859-1] (original)
+++ trunk/UnitTest/src/test/case.php [iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -1,7 +1,5 @@
<?php
require_once 'PHPUnit/Framework/TestCase.php';
-
-ezcTestRunner::addFileToFilter( __FILE__ );
abstract class ezcTestCase extends PHPUnit_Framework_TestCase
{
@@ -148,25 +146,5 @@
$this->fail( "Setting property $propertyName to $value did not
fail." );
}
}
-
- /**
- * BC Wrapper for getAttribute() (PHPUnit 3.0) / readAttribute() (PHPUnit
3.1)
- */
- public static function getAttribute( $classOrObject, $attributeName )
- {
- if ( is_callable( array( 'PHPUnit_Framework_Assert','readAttribute' )
) )
- {
- return PHPUnit_Framework_Assert::readAttribute( $classOrObject,
$attributeName );
- }
- else
- {
- return PHPUnit_Framework_Assert::getAttribute( $classOrObject,
$attributeName );
- }
- }
-
- /*
- * @todo recheck this later, as this might change again.
- */
- // public static abstract function suite();
}
?>
Modified: trunk/UnitTest/src/test/database_settings.php
==============================================================================
--- trunk/UnitTest/src/test/database_settings.php [iso-8859-1] (original)
+++ trunk/UnitTest/src/test/database_settings.php [iso-8859-1] Mon Jul 2
12:02:22 2007
@@ -7,8 +7,6 @@
* @copyright Copyright (C) 2005-2007 eZ systems as. All rights reserved.
* @license http://ez.no/licenses/new_bsd New BSD License
*/
-
-ezcTestRunner::addFileToFilter( __FILE__ );
/**
* This class represents the structure of all the database settings.
Modified: trunk/UnitTest/src/test/image_case.php
==============================================================================
--- trunk/UnitTest/src/test/image_case.php [iso-8859-1] (original)
+++ trunk/UnitTest/src/test/image_case.php [iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -1,7 +1,5 @@
<?php
require_once 'PHPUnit/Framework/TestCase.php';
-
-ezcTestRunner::addFileToFilter( __FILE__ );
abstract class ezcTestImageCase extends ezcTestCase
{
Modified: trunk/UnitTest/src/test/printer.php
==============================================================================
--- trunk/UnitTest/src/test/printer.php [iso-8859-1] (original)
+++ trunk/UnitTest/src/test/printer.php [iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -1,7 +1,5 @@
<?php
require_once 'PHPUnit/TextUI/ResultPrinter.php';
-
-ezcTestRunner::addFileToFilter( __FILE__ );
class ezcTestPrinter extends PHPUnit_TextUI_ResultPrinter
{
Modified: trunk/UnitTest/src/test/runner.php
==============================================================================
--- trunk/UnitTest/src/test/runner.php [iso-8859-1] (original)
+++ trunk/UnitTest/src/test/runner.php [iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -8,6 +8,14 @@
public static function main()
{
+ $version = PHPUnit_Runner_Version::id();
+
+ if ( version_compare( $version, '3.1.0' ) == -1 && $version !==
'@package_version@' )
+ {
+ echo "You need PHPUnit 3.1 (or later) to run this testsuite.\n";
+ die();
+ }
+
$tr = new ezcTestRunner();
$tr->runFromArguments();
}
@@ -109,13 +117,12 @@
$this->printCredits();
- print( '[Preparing tests]:' );
- $params = array();
+ $params = array();
+ $whitelist = false;
// Set the release. Default is trunk.
$release = $consoleInput->getOption( 'release' )->value;
- $allSuites = $this->prepareTests( $consoleInput->getArguments(),
$release );
$logfile = $consoleInput->getOption( 'log-xml' )->value;
$reportDir = $consoleInput->getOption( 'report-dir' )->value;
@@ -127,6 +134,7 @@
if ( $reportDir )
{
$params['reportDirectory'] = $reportDir;
+ $whitelist = true;
}
if ( $consoleInput->getOption( "verbose" )->value )
@@ -137,6 +145,8 @@
{
$params['verbose'] = false;
}
+
+ $allSuites = $this->prepareTests( $consoleInput->getArguments(),
$release, $whitelist );
$printer = new ezcTestPrinter( $params['verbose'] );
$this->setPrinter( $printer );
@@ -149,8 +159,10 @@
print( "ezcUnitTest uses the PHPUnit " . PHPUnit_Runner_Version::id()
. " framework from Sebastian Bergmann.\n\n" );
}
- protected function prepareTests( $packages, $release )
- {
+ protected function prepareTests( $packages, $release, $whitelist )
+ {
+ print( '[Preparing tests]:' );
+
$directory = getcwd();
$allSuites = new PHPUnit_Framework_TestSuite;
@@ -163,6 +175,8 @@
foreach ( $packages as $package )
{
+ $added = false;
+
$slashCount = substr_count( $package, '/' );
if ( ( $release == 'trunk' && $slashCount !== 0 ) || ( $release ==
'stable' && $slashCount > 1 ) )
{
@@ -174,6 +188,7 @@
if ( $class !== false )
{
$allSuites->addTest( call_user_func( array( $class,
'suite' ) ) );
+ $added = true;
}
else
{
@@ -188,6 +203,22 @@
if ( !is_null( $suite ) )
{
$allSuites->addTest( $suite );
+ $added = true;
+ }
+ }
+
+ if ( $whitelist && $added )
+ {
+ foreach ( glob( $directory . '/' . $package .
'/src/*_autoload.php' ) as $autoloadFile )
+ {
+ $autoloadArray = include $autoloadFile;
+
+ foreach ( $autoloadArray as $className => $fileName )
+ {
+ PHPUnit_Util_Filter::addFileToWhitelist(
+ $directory . '/' . str_replace( $package, $package .
'/src', $fileName )
+ );
+ }
}
}
}
@@ -335,12 +366,5 @@
die( $e->getMessage() );
}
}
-
- public static function addFileToFilter( $filename, $group = 'DEFAULT' )
- {
- PHPUnit_Util_Filter::addFileToFilter( $filename, $group );
- }
}
-
-ezcTestRunner::addFileToFilter( __FILE__ );
?>
Modified: trunk/UnitTest/src/test/settings.php
==============================================================================
--- trunk/UnitTest/src/test/settings.php [iso-8859-1] (original)
+++ trunk/UnitTest/src/test/settings.php [iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -7,8 +7,6 @@
* @copyright Copyright (C) 2005-2007 eZ systems as. All rights reserved.
* @license http://ez.no/licenses/new_bsd New BSD License
*/
-
-ezcTestRunner::addFileToFilter( __FILE__ );
/**
* This object stores the settings from the TestRunner. Every TestCase can get
Modified: trunk/Workflow/tests/case.php
==============================================================================
--- trunk/Workflow/tests/case.php [iso-8859-1] (original)
+++ trunk/Workflow/tests/case.php [iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -9,8 +9,6 @@
require_once 'service_object_with_constructor.php';
require_once 'variable_handler.php';
-
-ezcTestRunner::addFileToFilter( __FILE__ );
/**
* @package Workflow
Modified: trunk/Workflow/tests/execution.php
==============================================================================
--- trunk/Workflow/tests/execution.php [iso-8859-1] (original)
+++ trunk/Workflow/tests/execution.php [iso-8859-1] Mon Jul 2 12:02:22 2007
@@ -7,8 +7,6 @@
* @copyright Copyright (C) 2005-2007 eZ systems as. All rights reserved.
* @license http://ez.no/licenses/new_bsd New BSD License
*/
-
-ezcTestRunner::addFileToFilter( __FILE__ );
/**
* Workflow execution engine for testing workflows.
Modified: trunk/Workflow/tests/service_object_with_constructor.php
==============================================================================
--- trunk/Workflow/tests/service_object_with_constructor.php [iso-8859-1]
(original)
+++ trunk/Workflow/tests/service_object_with_constructor.php [iso-8859-1] Mon
Jul 2 12:02:22 2007
@@ -7,8 +7,6 @@
* @copyright Copyright (C) 2005-2007 eZ systems as. All rights reserved.
* @license http://ez.no/licenses/new_bsd New BSD License
*/
-
-ezcTestRunner::addFileToFilter( __FILE__ );
/**
* A service object that has a constructor.
Modified: trunk/Workflow/tests/variable_handler.php
==============================================================================
--- trunk/Workflow/tests/variable_handler.php [iso-8859-1] (original)
+++ trunk/Workflow/tests/variable_handler.php [iso-8859-1] Mon Jul 2 12:02:22
2007
@@ -6,8 +6,6 @@
* @copyright Copyright (C) 2005-2007 eZ systems as. All rights reserved.
* @license http://ez.no/licenses/new_bsd New BSD License
*/
-
-ezcTestRunner::addFileToFilter( __FILE__ );
/**
* @package Workflow
Modified: trunk/WorkflowDatabaseTiein/design/create_schema.php
==============================================================================
--- trunk/WorkflowDatabaseTiein/design/create_schema.php [iso-8859-1] (original)
+++ trunk/WorkflowDatabaseTiein/design/create_schema.php [iso-8859-1] Mon Jul
2 12:02:22 2007
@@ -24,8 +24,6 @@
str_replace(
'<?php return array (',
'<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
return array (',
file_get_contents('../tests/workflow.dba')
)
Modified: trunk/WorkflowDatabaseTiein/tests/case.php
==============================================================================
--- trunk/WorkflowDatabaseTiein/tests/case.php [iso-8859-1] (original)
+++ trunk/WorkflowDatabaseTiein/tests/case.php [iso-8859-1] Mon Jul 2 12:02:22
2007
@@ -6,8 +6,6 @@
* @copyright Copyright (C) 2005-2007 eZ systems as. All rights reserved.
* @license http://ez.no/licenses/new_bsd New BSD License
*/
-
-ezcTestRunner::addFileToFilter( __FILE__ );
require_once 'Workflow/tests/case.php';
Modified: trunk/WorkflowDatabaseTiein/tests/workflow.dba
==============================================================================
--- trunk/WorkflowDatabaseTiein/tests/workflow.dba [iso-8859-1] (original)
+++ trunk/WorkflowDatabaseTiein/tests/workflow.dba [iso-8859-1] Mon Jul 2
12:02:22 2007
@@ -1,6 +1,4 @@
<?php
-ezcTestRunner::addFileToFilter( __FILE__ );
-
return array (
0 =>
array (
Modified: trunk/WorkflowEventLogTiein/tests/case.php
==============================================================================
--- trunk/WorkflowEventLogTiein/tests/case.php [iso-8859-1] (original)
+++ trunk/WorkflowEventLogTiein/tests/case.php [iso-8859-1] Mon Jul 2 12:02:22
2007
@@ -6,8 +6,6 @@
* @copyright Copyright (C) 2005-2007 eZ systems as. All rights reserved.
* @license http://ez.no/licenses/new_bsd New BSD License
*/
-
-ezcTestRunner::addFileToFilter( __FILE__ );
require_once 'WorkflowDatabaseTiein/tests/case.php';
--
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components