1<?php
2
3/**
4 * This file is part of the Phalcon Framework.
5 *
6 * (c) Phalcon Team <team@phalcon.io>
7 *
8 * For the full copyright and license information, please view the LICENSE.txt
9 * file that was distributed with this source code.
10 */
11
12declare(strict_types=1);
13
14namespace Phalcon\Test\Unit\Translate\Adapter\Gettext;
15
16use Phalcon\Test\Fixtures\Traits\TranslateGettextTrait;
17use Phalcon\Translate\Adapter\Gettext;
18use Phalcon\Translate\InterpolatorFactory;
19use UnitTester;
20
21use const LC_MESSAGES;
22
23class GetCategoryCest
24{
25    use TranslateGettextTrait;
26
27    /**
28     * Tests Phalcon\Translate\Adapter\Gettext :: getCategory()
29     *
30     * @author Phalcon Team <team@phalcon.io>
31     * @since  2018-11-13
32     */
33    public function translateAdapterGettextGetCategory(UnitTester $I)
34    {
35        $I->wantToTest('Translate\Adapter\Gettext - getCategory()');
36
37        $params     = $this->getGettextConfig();
38        $translator = new Gettext(new InterpolatorFactory(), $params);
39
40        $I->assertEquals(
41            LC_MESSAGES,
42            $translator->getCategory()
43        );
44    }
45}
46