Skip to content

Commit

Permalink
The getOp method renamed to getOperator
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Timoshenko committed May 4, 2013
1 parent eb91524 commit d3aa934
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function reflect(FilterInterface $filter = null)
$ruleReflectionClass = sprintf(
'%s\Rule\%sRuleReflection',
__NAMESPACE__,
ucfirst($rule->getOp())
ucfirst($rule->getOperator())
);

if (!class_exists($ruleReflectionClass)) {
Expand Down
2 changes: 1 addition & 1 deletion src/IMT/DataGrid/Filter/Rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function getField()
/**
* {@inheritDoc}
*/
public function getOp()
public function getOperator()
{
return $this->options['op'];
}
Expand Down
2 changes: 1 addition & 1 deletion src/IMT/DataGrid/Filter/RuleInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ public function getField();
*
* @return string
*/
public function getOp();
public function getOperator();
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ protected function getRuleMock($op = 'bn')
->will($this->returnValue('field'));
$rule
->expects($this->any())
->method('getOp')
->method('getOperator')
->will($this->returnValue($op));

return $rule;
Expand Down
6 changes: 3 additions & 3 deletions tests/IMT/DataGrid/Tests/Filter/RuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ public function testGetField()
}

/**
* @covers IMT\DataGrid\Filter\Rule::getOp
* @covers IMT\DataGrid\Filter\Rule::getOperator
*/
public function testGetOp()
public function testGetOperator()
{
$this->assertEquals('bn', $this->rule->getOp());
$this->assertEquals('bn', $this->rule->getOperator());
}
}

0 comments on commit d3aa934

Please sign in to comment.