RedUNIT\Base\Joins::testSystemWideSettingsForJoins PHP Method

testSystemWideSettingsForJoins() public method

Tests R::setNarrowFieldMode() and OODBBean::ignoreJoinFeature().
    public function testSystemWideSettingsForJoins()
    {
        R::nuke();
        $author = R::dispense('author');
        $book = R::dispense('book');
        $info = R::dispense('info');
        $info->title = 'x';
        $author->xownBookList[] = $book;
        $book->info = $info;
        R::store($author);
        $author = $author->fresh();
        $books = $author->withCondition(' @joined.info.title != ? ', array('y1'))->xownBookList;
        $firstBook = reset($books);
        asrt(isset($firstBook->title), FALSE);
        R::setNarrowFieldMode(FALSE);
        $author = $author->fresh();
        $books = $author->withCondition(' @joined.info.title != ? ', array('y2'))->xownBookList;
        $firstBook = reset($books);
        asrt(isset($firstBook->title), TRUE);
        R::setNarrowFieldMode(TRUE);
    }