class Braintree_MultipleValueOrTextNodeTest in Commerce Braintree 7
Hierarchy
- class \Braintree_MultipleValueOrTextNodeTest extends \PHPUnit_Framework_TestCase
Expanded class hierarchy of Braintree_MultipleValueOrTextNodeTest
File
- braintree_php/
tests/ unit/ MultipleValueOrTextNodeTest.php, line 4
View source
class Braintree_MultipleValueOrTextNodeTest extends PHPUnit_Framework_TestCase {
function testIn() {
$node = new Braintree_MultipleValueOrTextNode('field');
$node
->in(array(
'firstValue',
'secondValue',
));
$this
->assertEquals(array(
'firstValue',
'secondValue',
), $node
->toParam());
}
function testIs() {
$node = new Braintree_MultipleValueOrTextNode('field');
$node
->is('value');
$this
->assertEquals(array(
'is' => 'value',
), $node
->toParam());
}
function testIsNot() {
$node = new Braintree_MultipleValueOrTextNode('field');
$node
->isNot('value');
$this
->assertEquals(array(
'is_not' => 'value',
), $node
->toParam());
}
function testStartsWith() {
$node = new Braintree_MultipleValueOrTextNode('field');
$node
->startsWith('beginning');
$this
->assertEquals(array(
'starts_with' => 'beginning',
), $node
->toParam());
}
function testEndsWith() {
$node = new Braintree_MultipleValueOrTextNode('field');
$node
->endsWith('end');
$this
->assertEquals(array(
'ends_with' => 'end',
), $node
->toParam());
}
function testContains() {
$node = new Braintree_MultipleValueOrTextNode('field');
$node
->contains('middle');
$this
->assertEquals(array(
'contains' => 'middle',
), $node
->toParam());
}
}