1

Hi I am trying to print my result using :

grabFromDatabase('tableNames','column1Name', array('column2Value' => '2'));

My result passes but does not show the actual result value in console. Any help much appreciated. Thanks

class_name: AcceptanceTester
modules:
    enabled:
        - Asserts

        - Db:
            dsn: "sqlsrv:Server=localhost,1433;Database=Db"
            user: 'username'
            password: 'pwd'
            dump: 'tests/_data/dump.sql'
            populate: true # run populator before all tests
            cleanup: true # run populator before each test
            populator: 'mssql -u $user -h $host $dbname < $dump'
        - \Helper\Acceptance
Anfath Hifans
  • 1,588
  • 1
  • 11
  • 20

1 Answers1

1

Not quite copy and paste solution but a different idea that might help. You can think of doing following:

  /**
     * @return mixed
     */
    public function grabMyStuff()
    {
        $query = "SELECT name FROM tableNames.column1Name WHERE column2Value = '2';
        $this->getModule('Db')->driver->executeQuery($query, [])->fetchAll();
        return $this;
    }
Stipe
  • 480
  • 5
  • 18