Phalcon\Test\Unit\Mvc\Model\ManagerTest::testAliasedNamespacesRelations PHP Method

testAliasedNamespacesRelations() public method

    public function testAliasedNamespacesRelations()
    {
        $this->specify("Aliased namespaces should work in relations", function () {
            $this->modelsManager->registerNamespaceAlias('AlbumORama', 'Phalcon\\Test\\Models\\AlbumORama');
            $albums = Albums::find();
            foreach ($albums as $album) {
                expect($album->artist)->isInstanceOf('Phalcon\\Test\\Models\\AlbumORama\\Artists');
            }
        });
    }