"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "public_html/lists/base/vendor/symfony/symfony/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/PhpBundleReaderTest.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).

PhpBundleReaderTest.php  (phplist-3.4.5.tgz):PhpBundleReaderTest.php  (phplist-3.4.6.tgz)
skipping to change at line 36 skipping to change at line 36
protected function setUp() protected function setUp()
{ {
$this->reader = new PhpBundleReader(); $this->reader = new PhpBundleReader();
} }
public function testReadReturnsArray() public function testReadReturnsArray()
{ {
$data = $this->reader->read(__DIR__.'/Fixtures/php', 'en'); $data = $this->reader->read(__DIR__.'/Fixtures/php', 'en');
$this->assertInternalType('array', $data); $this->assertIsArray($data);
$this->assertSame('Bar', $data['Foo']); $this->assertSame('Bar', $data['Foo']);
$this->assertArrayNotHasKey('ExistsNot', $data); $this->assertArrayNotHasKey('ExistsNot', $data);
} }
/**
* @expectedException \Symfony\Component\Intl\Exception\ResourceBundleNotFou
ndException
*/
public function testReadFailsIfNonExistingLocale() public function testReadFailsIfNonExistingLocale()
{ {
$this->expectException('Symfony\Component\Intl\Exception\ResourceBundleN otFoundException');
$this->reader->read(__DIR__.'/Fixtures/php', 'foo'); $this->reader->read(__DIR__.'/Fixtures/php', 'foo');
} }
/**
* @expectedException \Symfony\Component\Intl\Exception\RuntimeException
*/
public function testReadFailsIfNonExistingDirectory() public function testReadFailsIfNonExistingDirectory()
{ {
$this->expectException('Symfony\Component\Intl\Exception\RuntimeExceptio n');
$this->reader->read(__DIR__.'/foo', 'en'); $this->reader->read(__DIR__.'/foo', 'en');
} }
/**
* @expectedException \Symfony\Component\Intl\Exception\RuntimeException
*/
public function testReadFailsIfNotAFile() public function testReadFailsIfNotAFile()
{ {
$this->expectException('Symfony\Component\Intl\Exception\RuntimeExceptio n');
$this->reader->read(__DIR__.'/Fixtures/NotAFile', 'en'); $this->reader->read(__DIR__.'/Fixtures/NotAFile', 'en');
} }
/**
* @expectedException \Symfony\Component\Intl\Exception\ResourceBundleNotFou
ndException
*/
public function testReaderDoesNotBreakOutOfGivenPath() public function testReaderDoesNotBreakOutOfGivenPath()
{ {
$this->expectException('Symfony\Component\Intl\Exception\ResourceBundleN otFoundException');
$this->reader->read(__DIR__.'/Fixtures/php', '../invalid_directory/en'); $this->reader->read(__DIR__.'/Fixtures/php', '../invalid_directory/en');
} }
} }
 End of changes. 9 change blocks. 
15 lines changed or deleted 5 lines changed or added

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