<?php

namespace Kotchasan;

/**
 * Generated by PHPUnit_SkeletonGenerator on 2023-04-13 at 14:29:57.
 */
class PasswordTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var Password
     */
    protected $object;

    /**
     * Sets up the fixture, for example, opens a network connection.
     * This method is called before a test is executed.
     */
    protected function setUp()
    {

    }

    /**
     * Tears down the fixture, for example, closes a network connection.
     * This method is called after a test is executed.
     */
    protected function tearDown()
    {

    }

    /**
     * Generated from @assert (Password::encode("ทดสอบภาษาไทย", 12345678), 12345678) [==] "ทดสอบภาษาไทย".
     *
     * @covers Kotchasan\Password::decode
     */
    public function testDecode()
    {

        $this->assertEquals(
            "ทดสอบภาษาไทย",
            \Kotchasan\Password::decode(Password::encode("ทดสอบภาษาไทย", 12345678), 12345678)
        );
    }

    /**
     * Generated from @assert (Password::encode(1234, 12345678), 12345678) [==] 1234.
     *
     * @covers Kotchasan\Password::decode
     */
    public function testDecode2()
    {

        $this->assertEquals(
            1234,
            \Kotchasan\Password::decode(Password::encode(1234, 12345678), 12345678)
        );
    }

    /**
     * Generated from @assert ('12345678', 12345678) [throws] \Exception.
     *
     * @covers Kotchasan\Password::decode
     * @expectedException \Exception
     */
    public function testDecode3()
    {

        \Kotchasan\Password::decode('12345678', 12345678);
    }
}