PageRulesTargetTest.php 529 B

1234567891011121314151617181920212223
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: junade
  5. * Date: 19/09/2017
  6. * Time: 18:41
  7. */
  8. use Cloudflare\API\Configurations\PageRulesTargets;
  9. class PageRulesTargetTest extends TestCase
  10. {
  11. public function testGetArray()
  12. {
  13. $targets = new PageRulesTargets('junade.com/*');
  14. $array = $targets->getArray();
  15. $this->assertCount(1, $array);
  16. $this->assertEquals('junade.com/*', $array[0]['constraint']['value']);
  17. $this->assertEquals('matches', $array[0]['constraint']['operator']);
  18. }
  19. }