Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: UnionOfRAD/lithium
...
head fork: UnionOfRAD/lithium
  • 3 commits
  • 2 files changed
  • 0 commit comments
  • 2 contributors
Showing with 26 additions and 5 deletions.
  1. +2 −3 test/Unit.php
  2. +24 −2 tests/cases/test/UnitTest.php
View
5 test/Unit.php
@@ -900,8 +900,7 @@ protected function _compare($type, $expected, $result = null, $trace = null) {
if (!empty($data)) {
return $data;
}
- }
- if (!is_scalar($result)) {
+ } elseif (!is_scalar($result)) {
$data = $this->_compare($type, $result, $expected);
if (!empty($data)) {
@@ -1055,4 +1054,4 @@ protected function _hasNetwork($config = array()) {
}
}
-?>
+?>
View
26 tests/cases/test/UnitTest.php
@@ -622,6 +622,28 @@ public function testCompareIdenticalArray() {
$this->assertEqual($expected, $result);
}
+ public function testCompareIdenticalMixedArray() {
+ $array1 = array(
+ 'command' => 'test',
+ 'action' => 'action',
+ 'args' => array(),
+ 'long' => 'something',
+ 'i' => 1
+ );
+
+ $array2 = array(
+ 'command' => 'test',
+ 'action' => 'action',
+ 'long' => 'something',
+ 'args' => array(),
+ 'i' => 1
+ );
+
+ $result = $this->compare('identical', $array1, $array2);
+ $expected = array('trace' => null, 'expected' => $array1, 'result' => $array2);
+ $this->assertEqual($expected, $result);
+ }
+
public function imethods() {
return array('testCompareIdenticalArray');
}
@@ -643,7 +665,7 @@ public function testCompareIdenticalNullArray() {
*
*/
public function testResults() {
- $expected = 107;
+ $expected = 108;
$result = count($this->results());
$this->assertEqual($expected, $result);
}
@@ -671,7 +693,7 @@ public function testTestMethods() {
'testGetTest', 'testAssertCookie', 'testAssertCookieWithHeaders',
'testCompareWithEmptyResult',
'testExceptionCatching', 'testErrorHandling', 'testAssertObjects',
- 'testAssertArrayIdentical', 'testCompareIdenticalArray',
+ 'testAssertArrayIdentical', 'testCompareIdenticalArray','testCompareIdenticalMixedArray',
'testCompareEqualNullArray', 'testCompareIdenticalNullArray',
'testResults', 'testTestMethods'
);

No commit comments for this range

Something went wrong with that request. Please try again.