[MediaWiki-commits] [Gerrit] Added phpunit.xml file - change (mediawiki...Ask)

2013-05-08 Thread Daniel Werner (Code Review)
Daniel Werner has submitted this change and it was merged.

Change subject: Added phpunit.xml file
..


Added phpunit.xml file

so tests can be run with bootstrap and config from home dir without extra args

Change-Id: If9ccbe86b7254e79ac5f096103b5f85af7927daa
---
M Tests/Phpunit/phpunit.php
A Tests/bootstrap.php
A phpunit.xml.dist
3 files changed, 43 insertions(+), 14 deletions(-)

Approvals:
  Daniel Werner: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Tests/Phpunit/phpunit.php b/Tests/Phpunit/phpunit.php
index 66163d4..2ffaf53 100755
--- a/Tests/Phpunit/phpunit.php
+++ b/Tests/Phpunit/phpunit.php
@@ -10,20 +10,7 @@
 }
 require_once( 'PHPUnit/Autoload.php' );
 
-define( 'DATAVALUES', true );
-require_once( __DIR__ . '/../../Ask.php' );
-
-spl_autoload_register( function ( $className ) {
-   static $classes = false;
-
-   if ( $classes === false ) {
-   $classes = include(  __DIR__ . '/../AskTestClasses.php' );
-   }
-
-   if ( array_key_exists( $className, $classes ) ) {
-   include_once __DIR__ . '/../../../' . $classes[$className];
-   }
-} );
+require_once( __DIR__ . '/../bootstrap.php' );
 
 echo 'Running tests for Ask version ' . Ask_VERSION . .\n;
 
diff --git a/Tests/bootstrap.php b/Tests/bootstrap.php
new file mode 100644
index 000..95507fd
--- /dev/null
+++ b/Tests/bootstrap.php
@@ -0,0 +1,27 @@
+?php
+
+/**
+ * Test class registration file for the Ask library.
+ *
+ * @since 0.1
+ *
+ * @file
+ * @ingroup Ask
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw  jeroended...@gmail.com 
+ */
+
+require_once( __DIR__ . '/../Ask.php' );
+
+spl_autoload_register( function ( $className ) {
+   static $classes = false;
+
+   if ( $classes === false ) {
+   $classes = include(  __DIR__ . '/AskTestClasses.php' );
+   }
+
+   if ( array_key_exists( $className, $classes ) ) {
+   include_once __DIR__ . '/../../' . $classes[$className];
+   }
+} );
\ No newline at end of file
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
new file mode 100644
index 000..8c96eb6
--- /dev/null
+++ b/phpunit.xml.dist
@@ -0,0 +1,15 @@
+phpunit backupGlobals=false
+ backupStaticAttributes=false
+ bootstrap=Tests/bootstrap.php
+ cacheTokens=false
+ colors=false
+ convertErrorsToExceptions=true
+ convertNoticesToExceptions=true
+ convertWarningsToExceptions=true
+ stopOnError=false
+ stopOnFailure=false
+ stopOnIncomplete=false
+ stopOnSkipped=false
+ strict=true
+ verbose=true
+/phpunit

-- 
To view, visit https://gerrit.wikimedia.org/r/62589
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If9ccbe86b7254e79ac5f096103b5f85af7927daa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Ask
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de
Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Added phpunit.xml file - change (mediawiki...Ask)

2013-05-07 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/62589


Change subject: Added phpunit.xml file
..

Added phpunit.xml file

so tests can be run with bootstrap and config from home dir without extra args

Change-Id: If9ccbe86b7254e79ac5f096103b5f85af7927daa
---
M Tests/Phpunit/phpunit.php
A Tests/bootstrap.php
A phpunit.xml.dist
3 files changed, 43 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Ask 
refs/changes/89/62589/1

diff --git a/Tests/Phpunit/phpunit.php b/Tests/Phpunit/phpunit.php
index 66163d4..2ffaf53 100755
--- a/Tests/Phpunit/phpunit.php
+++ b/Tests/Phpunit/phpunit.php
@@ -10,20 +10,7 @@
 }
 require_once( 'PHPUnit/Autoload.php' );
 
-define( 'DATAVALUES', true );
-require_once( __DIR__ . '/../../Ask.php' );
-
-spl_autoload_register( function ( $className ) {
-   static $classes = false;
-
-   if ( $classes === false ) {
-   $classes = include(  __DIR__ . '/../AskTestClasses.php' );
-   }
-
-   if ( array_key_exists( $className, $classes ) ) {
-   include_once __DIR__ . '/../../../' . $classes[$className];
-   }
-} );
+require_once( __DIR__ . '/../bootstrap.php' );
 
 echo 'Running tests for Ask version ' . Ask_VERSION . .\n;
 
diff --git a/Tests/bootstrap.php b/Tests/bootstrap.php
new file mode 100644
index 000..95507fd
--- /dev/null
+++ b/Tests/bootstrap.php
@@ -0,0 +1,27 @@
+?php
+
+/**
+ * Test class registration file for the Ask library.
+ *
+ * @since 0.1
+ *
+ * @file
+ * @ingroup Ask
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw  jeroended...@gmail.com 
+ */
+
+require_once( __DIR__ . '/../Ask.php' );
+
+spl_autoload_register( function ( $className ) {
+   static $classes = false;
+
+   if ( $classes === false ) {
+   $classes = include(  __DIR__ . '/AskTestClasses.php' );
+   }
+
+   if ( array_key_exists( $className, $classes ) ) {
+   include_once __DIR__ . '/../../' . $classes[$className];
+   }
+} );
\ No newline at end of file
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
new file mode 100644
index 000..8c96eb6
--- /dev/null
+++ b/phpunit.xml.dist
@@ -0,0 +1,15 @@
+phpunit backupGlobals=false
+ backupStaticAttributes=false
+ bootstrap=Tests/bootstrap.php
+ cacheTokens=false
+ colors=false
+ convertErrorsToExceptions=true
+ convertNoticesToExceptions=true
+ convertWarningsToExceptions=true
+ stopOnError=false
+ stopOnFailure=false
+ stopOnIncomplete=false
+ stopOnSkipped=false
+ strict=true
+ verbose=true
+/phpunit

-- 
To view, visit https://gerrit.wikimedia.org/r/62589
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If9ccbe86b7254e79ac5f096103b5f85af7927daa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Ask
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits