RedUNIT\Base\Foreignkeys::testCreationOfForeignKeys PHP Method

testCreationOfForeignKeys() public method

Tests whether foreign keys are created correctly for certain relations.
public testCreationOfForeignKeys ( ) : void
return void
    public function testCreationOfForeignKeys()
    {
        $this->queries = array();
        $account = R::dispense('account');
        $user = R::dispense('user');
        $player = R::dispense('player');
        $user->account = $account;
        R::store($user);
        asrt(strpos(implode(',', $this->queries), 'index_foreignkey_user_account') !== FALSE, TRUE);
        $this->queries = array();
        $player->account = $account;
        R::store($player);
        asrt(strpos(implode(',', $this->queries), 'index_foreignkey_player_accou') !== FALSE, TRUE);
    }