FontAwesome4CollectorTest.php 810 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace Tools\Test\TestCase\View\Icon\Collector;
  3. use Cake\TestSuite\TestCase;
  4. use Tools\View\Icon\Collector\FontAwesome4IconCollector;
  5. class FontAwesome4CollectorTest extends TestCase {
  6. /**
  7. * Show that we are still API compatible/valid.
  8. *
  9. * @dataProvider extensions
  10. *
  11. * @param string $extension
  12. *
  13. * @return void
  14. */
  15. public function testCollect(string $extension): void {
  16. $path = TEST_FILES . 'font_icon' . DS . 'fa4' . DS . 'variables.' . $extension;
  17. $result = FontAwesome4IconCollector::collect($path);
  18. $this->assertTrue(count($result) > 780, 'count of ' . count($result));
  19. $this->assertTrue(in_array('thumbs-up', $result, true));
  20. }
  21. /**
  22. * @return array
  23. */
  24. public function extensions(): array {
  25. return [
  26. 'scss' => ['scss'],
  27. 'less' => ['less'],
  28. ];
  29. }
  30. }