"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "public_html/lists/base/vendor/symfony/symfony/src/Symfony/Component/Yaml/Tests/DumperTest.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).

DumperTest.php  (phplist-3.4.5.tgz):DumperTest.php  (phplist-3.4.6.tgz)
skipping to change at line 234 skipping to change at line 234
$this->assertEquals('{ foo: !php/object \'O:30:"Symfony\Component\Yaml\T ests\A":1:{s:1:"a";s:3:"foo";}\', bar: 1 }', $dump, '->dump() is able to dump ob jects'); $this->assertEquals('{ foo: !php/object \'O:30:"Symfony\Component\Yaml\T ests\A":1:{s:1:"a";s:3:"foo";}\', bar: 1 }', $dump, '->dump() is able to dump ob jects');
} }
public function testObjectSupportDisabledButNoExceptions() public function testObjectSupportDisabledButNoExceptions()
{ {
$dump = $this->dumper->dump(['foo' => new A(), 'bar' => 1]); $dump = $this->dumper->dump(['foo' => new A(), 'bar' => 1]);
$this->assertEquals('{ foo: null, bar: 1 }', $dump, '->dump() does not d ump objects when disabled'); $this->assertEquals('{ foo: null, bar: 1 }', $dump, '->dump() does not d ump objects when disabled');
} }
/**
* @expectedException \Symfony\Component\Yaml\Exception\DumpException
*/
public function testObjectSupportDisabledWithExceptions() public function testObjectSupportDisabledWithExceptions()
{ {
$this->expectException('Symfony\Component\Yaml\Exception\DumpException') ;
$this->dumper->dump(['foo' => new A(), 'bar' => 1], 0, 0, Yaml::DUMP_EXC EPTION_ON_INVALID_TYPE); $this->dumper->dump(['foo' => new A(), 'bar' => 1], 0, 0, Yaml::DUMP_EXC EPTION_ON_INVALID_TYPE);
} }
/** /**
* @group legacy * @group legacy
* @expectedException \Symfony\Component\Yaml\Exception\DumpException
*/ */
public function testObjectSupportDisabledWithExceptionsPassingTrue() public function testObjectSupportDisabledWithExceptionsPassingTrue()
{ {
$this->expectException('Symfony\Component\Yaml\Exception\DumpException') ;
$this->dumper->dump(['foo' => new A(), 'bar' => 1], 0, 0, true); $this->dumper->dump(['foo' => new A(), 'bar' => 1], 0, 0, true);
} }
public function testEmptyArray() public function testEmptyArray()
{ {
$dump = $this->dumper->dump([]); $dump = $this->dumper->dump([]);
$this->assertEquals('{ }', $dump); $this->assertEquals('{ }', $dump);
$dump = $this->dumper->dump([], 0, 0, Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE ); $dump = $this->dumper->dump([], 0, 0, Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE );
$this->assertEquals('[]', $dump); $this->assertEquals('[]', $dump);
skipping to change at line 562 skipping to change at line 560
]; ];
$this->assertSame(file_get_contents(__DIR__.'/Fixtures/multiple_lines_as _literal_block_leading_space_in_first_line.yml'), $this->dumper->dump($data, 2, 0, Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK)); $this->assertSame(file_get_contents(__DIR__.'/Fixtures/multiple_lines_as _literal_block_leading_space_in_first_line.yml'), $this->dumper->dump($data, 2, 0, Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK));
} }
public function testCarriageReturnIsMaintainedWhenDumpingAsMultiLineLiteralB lock() public function testCarriageReturnIsMaintainedWhenDumpingAsMultiLineLiteralB lock()
{ {
$this->assertSame("- \"a\\r\\nb\\nc\"\n", $this->dumper->dump(["a\r\nb\n c"], 2, 0, Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK)); $this->assertSame("- \"a\\r\\nb\\nc\"\n", $this->dumper->dump(["a\r\nb\n c"], 2, 0, Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK));
} }
/**
* @expectedException \InvalidArgumentException
* @expectedExceptionMessage The indentation must be greater than zero
*/
public function testZeroIndentationThrowsException() public function testZeroIndentationThrowsException()
{ {
$this->expectException('InvalidArgumentException');
$this->expectExceptionMessage('The indentation must be greater than zero
');
new Dumper(0); new Dumper(0);
} }
/**
* @expectedException \InvalidArgumentException
* @expectedExceptionMessage The indentation must be greater than zero
*/
public function testNegativeIndentationThrowsException() public function testNegativeIndentationThrowsException()
{ {
$this->expectException('InvalidArgumentException');
$this->expectExceptionMessage('The indentation must be greater than zero
');
new Dumper(-4); new Dumper(-4);
} }
} }
class A class A
{ {
public $a = 'foo'; public $a = 'foo';
} }
 End of changes. 8 change blocks. 
12 lines changed or deleted 8 lines changed or added

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