Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
99356c28
Unverified
Commit
99356c28
authored
7 years ago
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed HydratorMockStatement since it's not used anywhere since 2.0
parent
5e2b7f89
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
101 deletions
+0
-101
HydratorMockStatement.php
tests/Doctrine/Tests/Mocks/HydratorMockStatement.php
+0
-101
No files found.
tests/Doctrine/Tests/Mocks/HydratorMockStatement.php
deleted
100644 → 0
View file @
5e2b7f89
<?php
namespace
Doctrine\Tests\Mocks
;
/**
* This class is a mock of the Statement interface that can be passed in to the Hydrator
* to test the hydration standalone with faked result sets.
*
* @author Roman Borschel <roman@code-factory.org>
*/
class
HydratorMockStatement
implements
\Doctrine\DBAL\Driver\Statement
{
private
$_resultSet
;
/**
* Creates a new mock statement that will serve the provided fake result set to clients.
*
* @param array $resultSet The faked SQL result set.
*/
public
function
__construct
(
array
$resultSet
)
{
$this
->
_resultSet
=
$resultSet
;
}
/**
* Fetches all rows from the result set.
*
* @return array
*/
public
function
fetchAll
(
$fetchMode
=
null
,
$columnIndex
=
null
,
array
$ctorArgs
=
null
)
{
return
$this
->
_resultSet
;
}
public
function
fetchColumn
(
$columnNumber
=
0
)
{
$row
=
current
(
$this
->
_resultSet
);
if
(
!
is_array
(
$row
))
return
false
;
$val
=
array_shift
(
$row
);
return
$val
!==
null
?
$val
:
false
;
}
/**
* Fetches the next row in the result set.
*
*/
public
function
fetch
(
$fetchMode
=
null
)
{
$current
=
current
(
$this
->
_resultSet
);
next
(
$this
->
_resultSet
);
return
$current
;
}
/**
* Closes the cursor, enabling the statement to be executed again.
*
* @return bool
*/
public
function
closeCursor
()
{
return
true
;
}
public
function
setResultSet
(
array
$resultSet
)
{
reset
(
$resultSet
);
$this
->
_resultSet
=
$resultSet
;
}
public
function
bindColumn
(
$column
,
&
$param
,
$type
=
null
)
{
}
public
function
bindValue
(
$param
,
$value
,
$type
=
null
)
{
}
public
function
bindParam
(
$column
,
&
$variable
,
$type
=
null
,
$length
=
null
,
$driverOptions
=
array
())
{
}
public
function
columnCount
()
{
}
public
function
errorCode
()
{
}
public
function
errorInfo
()
{
}
public
function
execute
(
$params
=
array
())
{
}
public
function
rowCount
()
{
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment