MultipleValueNodeTest.php 566 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace Test\Unit;
  3. require_once dirname(__DIR__) . '/Setup.php';
  4. use Test\Setup;
  5. use Braintree;
  6. class MultipleValueNodeTest extends Setup
  7. {
  8. public function testIs()
  9. {
  10. $node = new Braintree\MultipleValueNode('field');
  11. $node->is('value');
  12. $this->assertEquals(['value'], $node->toParam());
  13. }
  14. public function testIn()
  15. {
  16. $node = new Braintree\MultipleValueNode('field');
  17. $node->in(['firstValue', 'secondValue']);
  18. $this->assertEquals(['firstValue', 'secondValue'], $node->toParam());
  19. }
  20. }