CoreFiles by mySites.guru
UtilTest.php30 lines, 769 bytes, from Joomla_4.1.2-Stable-Full_Package.zip
Raw History Compare with 4.1.1
md5
a7a35c317ea1e5f3b6b71fdba45b27e3
sha1
536a92f16d46ff8bc9e8fff7d063d2d11f2d87f4
sha256
4e2c6b4bedf0a1c51f658d14f0cef1b3e7b5fbb52fa256f699800e966cc40e85
<?php

/*
 * This file is part of JSON-API.
 *
 * (c) Toby Zerner <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Tobscure\Tests\JsonApi;

use Tobscure\JsonApi\Util;

class UtilTest extends AbstractTestCase
{
    public function testParseRelationshipPaths()
    {
        $this->assertEquals(
            ['user' => ['employer', 'employer.country'], 'comments' => []],
            Util::parseRelationshipPaths(['user', 'user.employer', 'user.employer.country', 'comments'])
        );

        $this->assertEquals(
            ['user' => ['employer.country']],
            Util::parseRelationshipPaths(['user.employer.country'])
        );
    }
}

The same content is in 9 releases, Joomla 4.1.0-rc1 to 4.1.2. See them all, or every version of this file.