Phalcon\Test\Unit\VersionTest::testVersionGetIdToGet PHP Method

testVersionGetIdToGet() public method

Tests the getId() translation to get()
Since: 2014-09-04
Author: Nikolaos Dimopoulos ([email protected])
    public function testVersionGetIdToGet()
    {
        $this->specify("getId() to get() does not produce the same result", function () {
            $id = Version::getId();
            $major = intval($id[0]);
            $med = intval($id[1] . $id[2]);
            $min = intval($id[3] . $id[4]);
            $special = $this->numberToSpecial($id[5]);
            $specialNo = $special ? $id[6] : '';
            $expected = trim("{$major}.{$med}.{$min} {$special} {$specialNo}");
            $actual = Version::get();
            expect($actual)->equals($expected);
        });
    }