Skip to content

Commit d6bff71

Browse files
finwekukulich
authored andcommitted
Add base Gettext parser test
1 parent 4190a6f commit d6bff71

File tree

2 files changed

+1526
-0
lines changed

2 files changed

+1526
-0
lines changed

tests/Jyxo/Gettext/ParserTest.php

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php declare(strict_types = 1);
2+
3+
/**
4+
* Jyxo PHP Library
5+
*
6+
* LICENSE
7+
*
8+
* This source file is subject to the new BSD license that is bundled
9+
* with this package in the file license.txt.
10+
* It is also available through the world-wide-web at this URL:
11+
* https://github.com/jyxo/php/blob/master/license.txt
12+
*/
13+
14+
namespace Jyxo\Gettext;
15+
16+
use Jyxo\Gettext\Parser\Item;
17+
18+
/**
19+
* Test for class \Jyxo\Input\Factory
20+
*
21+
* @copyright Copyright (c) 2005-2011 Jyxo, s.r.o.
22+
* @license https://github.com/jyxo/php/blob/master/license.txt
23+
* @author Matěj Humpál
24+
*/
25+
class FactoryTest extends \PHPUnit_Framework_TestCase
26+
{
27+
28+
public function testParse()
29+
{
30+
$po = new Parser(__DIR__ . '/../../files/gettext/patterns.cs.po');
31+
$this->assertCount(300, $po);
32+
foreach ($po as $item) {
33+
$this->assertInstanceOf(Item::class, $item);
34+
}
35+
}
36+
37+
}

0 commit comments

Comments
 (0)