|
From: <al...@us...> - 2013-06-16 09:40:59
|
Revision: 11693
http://sourceforge.net/p/xoops/svn/11693
Author: alain91
Date: 2013-06-16 09:40:56 +0000 (Sun, 16 Jun 2013)
Log Message:
-----------
restrict methods to phpunit ones only
modify default directories in phpunit.xml
Modified Paths:
--------------
XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/common_phpunit.php
XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/phpunit.xml
Modified: XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/common_phpunit.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/common_phpunit.php 2013-06-15 20:51:13 UTC (rev 11692)
+++ XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/common_phpunit.php 2013-06-16 09:40:56 UTC (rev 11693)
@@ -32,72 +32,8 @@
class MY_UnitTestCase extends PHPUnit_Framework_TestCase
{
- function assertIdentical($arg1, $arg2)
+
+ function expectError()
{
- return $this->assertSame($arg2, $arg1);
}
-
- function assertEqual($arg1, $arg2)
- {
- return $this->assertEquals($arg2, $arg1);
- }
-
- function assertPattern($arg1, $arg2)
- {
- return $this->assertRegExp($arg1, $arg2);
- }
-
- function expectError($arg1 = null)
- {
- }
-
- function expectException($arg1 = null)
- {
- }
-
-/**
- * base include file for SimpleTest
- * @package SimpleTest
- * @subpackage UnitTester
- * @version $Id: expectation.php 2009 2011-04-28 08:57:25Z pp11 $
- */
-
- /**
- * Tests the expectation. True if the type or
- * class matches the string value.
- * @param string $compare Comparison value.
- * @return boolean True if correct.
- * @access public
- */
- function assertIsA($object, $type, $message='')
- {
- if (class_exists($type, false)) {
- $this->assertInstanceOf($type, $object, $message);
- return true;
- } else {
- $function = 'is_'.$this->canonicalType($type);
- if (is_callable($function)) {
- $this->assertTrue($function($object));
- return true;
- }
- $this->assertTrue(false);
- return true;
- }
- }
-
- /**
- * Coerces type name into a is_*() match.
- * @param string $type User type.
- * @return string Simpler type.
- * @access private
- */
- protected function canonicalType($type) {
- $type = strtolower($type);
- $map = array('boolean' => 'bool');
- if (isset($map[$type])) {
- $type = $map[$type];
- }
- return $type;
- }
-
}
Modified: XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/phpunit.xml
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/phpunit.xml 2013-06-15 20:51:13 UTC (rev 11692)
+++ XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/phpunit.xml 2013-06-16 09:40:56 UTC (rev 11693)
@@ -10,7 +10,8 @@
<testsuites>
<testsuite name="My Test Suite">
- <directory>UnitTestXoops</directory>
+ <directory>class</directory>
+ <directory>kernel</directory>
</testsuite>
</testsuites>
|