public function test_getQueryToSelect() { /** === Test Data === */ $RESULT = 'result'; /** === Setup Mocks === */ // $result = $this->_factorySelect->getQueryToSelect(); $this->mFactorySelect->shouldReceive('getQueryToSelect')->once()->andReturn($RESULT); /** === Call and asserts === */ $res = $this->obj->getQueryToSelect(); $this->assertEquals($RESULT, $res); }