Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
EcomDev_PHPUnit
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Open
EcomDev_PHPUnit
Commits
0e77ecba
Commit
0e77ecba
authored
Feb 01, 2012
by
Valentin Sushkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed constraint evaluation
parent
923ba924
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
4 deletions
+21
-4
lib/EcomDev/PHPUnit/Constraint/Abstract.php
lib/EcomDev/PHPUnit/Constraint/Abstract.php
+21
-4
No files found.
lib/EcomDev/PHPUnit/Constraint/Abstract.php
View file @
0e77ecba
...
...
@@ -149,12 +149,29 @@ abstract class EcomDev_PHPUnit_Constraint_Abstract
/**
* Evaluates value by type.
*
(non-PHPdoc)
*
* @see PHPUnit_Framework_Constraint::evaluate()
*
* @param mixed $other Value or object to evaluate.
* @param string $description Additional information about the test
* @param bool $returnResult Whether to return a result or throw an exception
* @return mixed
*/
public
function
evaluate
(
$other
)
public
function
evaluate
(
$other
,
$description
=
''
,
$returnResult
=
false
)
{
return
$this
->
callProtectedByType
(
'evaluate'
,
$other
);
$success
=
false
;
if
(
$this
->
callProtectedByType
(
'evaluate'
,
$other
))
{
$success
=
true
;
}
if
(
$returnResult
)
{
return
$success
;
}
if
(
!
$success
)
{
$this
->
fail
(
$other
,
$description
);
}
}
/**
...
...
@@ -215,4 +232,4 @@ abstract class EcomDev_PHPUnit_Constraint_Abstract
{
return
$this
->
callProtectedByType
(
'text'
);
}
}
\ No newline at end of file
}
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