CorsServiceTest.php 981 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /*
  3. * This file is part of asm89/stack-cors.
  4. *
  5. * (c) Alexander <iam.asm89@gmail.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Asm89\Stack\Tests;
  11. use Asm89\Stack\CorsService;
  12. use PHPUnit\Framework\TestCase;
  13. class CorsServiceTest extends TestCase
  14. {
  15. /**
  16. * @test
  17. */
  18. public function it_can_have_options()
  19. {
  20. $service = new CorsService([
  21. 'allowedOrigins' => ['*']
  22. ]);
  23. $this->assertInstanceOf(CorsService::class, $service);
  24. }
  25. /**
  26. * @test
  27. */
  28. public function it_can_have_no_options()
  29. {
  30. $service = new CorsService();
  31. $this->assertInstanceOf(CorsService::class, $service);
  32. }
  33. /**
  34. * @test
  35. */
  36. public function it_can_have_empty_options()
  37. {
  38. $service = new CorsService([]);
  39. $this->assertInstanceOf(CorsService::class, $service);
  40. }
  41. }