"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "public_html/lists/base/vendor/symfony/symfony/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php" between
phplist-3.4.5.tgz and phplist-3.4.6.tgz

About: phpList is a one-way email announcement delivery system for newsletters, publicity lists, notifications, and many other uses (requires PHP and MySQL).

FlattenExceptionTest.php  (phplist-3.4.5.tgz):FlattenExceptionTest.php  (phplist-3.4.6.tgz)
skipping to change at line 259 skipping to change at line 259
$this->assertSame(['boolean', true], $array[$i++]); $this->assertSame(['boolean', true], $array[$i++]);
$this->assertSame(['boolean', false], $array[$i++]); $this->assertSame(['boolean', false], $array[$i++]);
$this->assertSame(['integer', 0], $array[$i++]); $this->assertSame(['integer', 0], $array[$i++]);
$this->assertSame(['float', 0.0], $array[$i++]); $this->assertSame(['float', 0.0], $array[$i++]);
$this->assertSame(['string', '0'], $array[$i++]); $this->assertSame(['string', '0'], $array[$i++]);
$this->assertSame(['string', ''], $array[$i++]); $this->assertSame(['string', ''], $array[$i++]);
$this->assertSame(['float', INF], $array[$i++]); $this->assertSame(['float', INF], $array[$i++]);
// assertEquals() does not like NAN values. // assertEquals() does not like NAN values.
$this->assertEquals($array[$i][0], 'float'); $this->assertEquals($array[$i][0], 'float');
$this->assertTrue(is_nan($array[$i++][1])); $this->assertNan($array[$i++][1]);
} }
public function testRecursionInArguments() public function testRecursionInArguments()
{ {
$a = null; $a = null;
$a = ['foo', [2, &$a]]; $a = ['foo', [2, &$a]];
$exception = $this->createException($a); $exception = $this->createException($a);
$flattened = FlattenException::create($exception); $flattened = FlattenException::create($exception);
$trace = $flattened->getTrace(); $trace = $flattened->getTrace();
$this->assertContains('*DEEP NESTED ARRAY*', serialize($trace)); $this->assertStringContainsString('*DEEP NESTED ARRAY*', serialize($trac e));
} }
public function testTooBigArray() public function testTooBigArray()
{ {
$a = []; $a = [];
for ($i = 0; $i < 20; ++$i) { for ($i = 0; $i < 20; ++$i) {
for ($j = 0; $j < 50; ++$j) { for ($j = 0; $j < 50; ++$j) {
for ($k = 0; $k < 10; ++$k) { for ($k = 0; $k < 10; ++$k) {
$a[$i][$j][$k] = 'value'; $a[$i][$j][$k] = 'value';
} }
skipping to change at line 294 skipping to change at line 294
$a[21] = 'value1'; $a[21] = 'value1';
$exception = $this->createException($a); $exception = $this->createException($a);
$flattened = FlattenException::create($exception); $flattened = FlattenException::create($exception);
$trace = $flattened->getTrace(); $trace = $flattened->getTrace();
$this->assertSame($trace[1]['args'][0], ['array', ['array', '*SKIPPED ov er 10000 entries*']]); $this->assertSame($trace[1]['args'][0], ['array', ['array', '*SKIPPED ov er 10000 entries*']]);
$serializeTrace = serialize($trace); $serializeTrace = serialize($trace);
$this->assertContains('*SKIPPED over 10000 entries*', $serializeTrace); $this->assertStringContainsString('*SKIPPED over 10000 entries*', $seria
$this->assertNotContains('*value1*', $serializeTrace); lizeTrace);
$this->assertStringNotContainsString('*value1*', $serializeTrace);
} }
private function createException($foo) private function createException($foo)
{ {
return new \Exception(); return new \Exception();
} }
} }
 End of changes. 3 change blocks. 
4 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)