#!/usr/bin/env php getAppRoot(); $sqlFile = $appPath . 'test/data/pivot.sql'; $tester->dbh->exec(file_get_contents($sqlFile)); su('admin'); $pivotTest = new pivotModelTest(); r($pivotTest->getPivotSpecTest(1000, '1')) && p('id') && e('1000'); r($pivotTest->getPivotSpecTest(999999, '1')) && p() && e('0'); r($pivotTest->getPivotSpecTest(1001, 'nonexistent')) && p('id') && e('1001'); r($pivotTest->getPivotSpecTest(1002, '1', true)) && p('id') && e('1002'); r($pivotTest->getPivotSpecTest(1003, '1', false, false)) && p('id') && e('1003'); r($pivotTest->getPivotSpecTest(1004, '1')) && p('id') && e('1004'); r($pivotTest->getPivotSpecTest(1005, '1')) && p('id') && e('1005');