Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. <?php
  2.  
  3. namespace Tests\Unit;
  4.  
  5. use Tests\TestCase;
  6. use Illuminate\Foundation\Testing\DatabaseMigrations;
  7. use Illuminate\Foundation\Testing\DatabaseTransactions;
  8.  
  9. class Hex2RgbaTest extends TestCase
  10. {
  11. /**
  12. * A basic test example.
  13. *
  14. * @return void
  15. */
  16. public function completeHexTest()
  17. {
  18. $this->assertEquals('FFFFFF',completeHex('FFF'));
  19. }
  20.  
  21. public function checkHexFormatTest()
  22. {
  23. hex2rgba('FFFF');
  24. }
  25.  
  26. public function Hex2RgbaValidationTest()
  27. {
  28. $this->assertEquals('rgb(255, 255, 255, 0.3)', hex2Rgba('#FFF', '0.3'));
  29. $this->assertEquals('rgb(255, 255, 255, 1)', hex2Rgba('#FFFFFF', 1));
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement