Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Cannot access, nor test, the protected variable $this->select in Insert.php #175

@dmalouf

Description

@dmalouf

In ./src/Sql/Insert.php there is a protected variable $select (line 46). However, this variable is not able to be retrieved directly because

  1. The magic getter (line 275) only retrieves values from $this->columns
  2. ->getRawState (line 158) only retrieves $this->table and $this->columns (keys, values)

As such, it is not possible to access $this->select as it is hidden from the calling-code, thereby making it impossible to test the Select object stored in $this->select. The only workaround at this time is to use ->getSqlString() and use string comparison on the actual SQL string (eew).

Can we provide (read-only) access to $this->select in order to facilitate testing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions