Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated unit tests with less.php specific tests.

  • Loading branch information...
commit b93d84b92eed40362cc4421ecf4883f3685980bf 1 parent f75650c
Matt Agar agar authored
Showing with 26 additions and 6 deletions.
  1. 0  test/Less/Tests/Fixtures/{ → less.js}/css/colors.css
  2. 0  test/Less/Tests/Fixtures/{ → less.js}/css/comments.css
  3. 0  test/Less/Tests/Fixtures/{ → less.js}/css/css-3.css
  4. 0  test/Less/Tests/Fixtures/{ → less.js}/css/css-escapes.css
  5. 0  test/Less/Tests/Fixtures/{ → less.js}/css/css.css
  6. 0  test/Less/Tests/Fixtures/{ → less.js}/css/functions.css
  7. 0  test/Less/Tests/Fixtures/{ → less.js}/css/import.css
  8. 0  test/Less/Tests/Fixtures/{ → less.js}/css/lazy-eval.css
  9. 0  test/Less/Tests/Fixtures/{ → less.js}/css/media.css
  10. 0  test/Less/Tests/Fixtures/{ → less.js}/css/mixins-args.css
  11. 0  test/Less/Tests/Fixtures/{ → less.js}/css/mixins-closure.css
  12. 0  test/Less/Tests/Fixtures/{ → less.js}/css/mixins-nested.css
  13. 0  test/Less/Tests/Fixtures/{ → less.js}/css/mixins-pattern.css
  14. 0  test/Less/Tests/Fixtures/{ → less.js}/css/mixins.css
  15. 0  test/Less/Tests/Fixtures/{ → less.js}/css/operations.css
  16. 0  test/Less/Tests/Fixtures/{ → less.js}/css/parens.css
  17. 0  test/Less/Tests/Fixtures/{ → less.js}/css/rulesets.css
  18. 0  test/Less/Tests/Fixtures/{ → less.js}/css/scope.css
  19. 0  test/Less/Tests/Fixtures/{ → less.js}/css/selectors.css
  20. 0  test/Less/Tests/Fixtures/{ → less.js}/css/strings.css
  21. 0  test/Less/Tests/Fixtures/{ → less.js}/css/variables.css
  22. 0  test/Less/Tests/Fixtures/{ → less.js}/css/whitespace.css
  23. 0  test/Less/Tests/Fixtures/{ → less.js}/less/colors.less
  24. 0  test/Less/Tests/Fixtures/{ → less.js}/less/comments.less
  25. 0  test/Less/Tests/Fixtures/{ → less.js}/less/css-3.less
  26. 0  test/Less/Tests/Fixtures/{ → less.js}/less/css-escapes.less
  27. 0  test/Less/Tests/Fixtures/{ → less.js}/less/css.less
  28. +0 −1  test/Less/Tests/Fixtures/{ → less.js}/less/functions.less
  29. 0  test/Less/Tests/Fixtures/{ → less.js}/less/import.less
  30. 0  test/Less/Tests/Fixtures/{ → less.js}/less/import/import-test-a.less
  31. 0  test/Less/Tests/Fixtures/{ → less.js}/less/import/import-test-b.less
  32. 0  test/Less/Tests/Fixtures/{ → less.js}/less/import/import-test-c.less
  33. 0  test/Less/Tests/Fixtures/{ → less.js}/less/import/import-test-d.css
  34. 0  test/Less/Tests/Fixtures/{ → less.js}/less/lazy-eval.less
  35. 0  test/Less/Tests/Fixtures/{ → less.js}/less/media.less
  36. 0  test/Less/Tests/Fixtures/{ → less.js}/less/mixins-args.less
  37. 0  test/Less/Tests/Fixtures/{ → less.js}/less/mixins-closure.less
  38. 0  test/Less/Tests/Fixtures/{ → less.js}/less/mixins-nested.less
  39. 0  test/Less/Tests/Fixtures/{ → less.js}/less/mixins-pattern.less
  40. 0  test/Less/Tests/Fixtures/{ → less.js}/less/mixins.less
  41. 0  test/Less/Tests/Fixtures/{ → less.js}/less/operations.less
  42. 0  test/Less/Tests/Fixtures/{ → less.js}/less/parens.less
  43. 0  test/Less/Tests/Fixtures/{ → less.js}/less/rulesets.less
  44. 0  test/Less/Tests/Fixtures/{ → less.js}/less/scope.less
  45. 0  test/Less/Tests/Fixtures/{ → less.js}/less/selectors.less
  46. 0  test/Less/Tests/Fixtures/{ → less.js}/less/strings.less
  47. 0  test/Less/Tests/Fixtures/{ → less.js}/less/variables.less
  48. 0  test/Less/Tests/Fixtures/{ → less.js}/less/whitespace.less
  49. +26 −5 test/Less/Tests/ParserTest.php
0  test/Less/Tests/Fixtures/css/colors.css → test/Less/Tests/Fixtures/less.js/css/colors.css
View
File renamed without changes
0  test/Less/Tests/Fixtures/css/comments.css → test/Less/Tests/Fixtures/less.js/css/comments.css
View
File renamed without changes
0  test/Less/Tests/Fixtures/css/css-3.css → test/Less/Tests/Fixtures/less.js/css/css-3.css
View
File renamed without changes
0  test/Less/Tests/Fixtures/css/css-escapes.css → test/Less/Tests/Fixtures/less.js/css/css-escapes.css
View
File renamed without changes
0  test/Less/Tests/Fixtures/css/css.css → test/Less/Tests/Fixtures/less.js/css/css.css
View
File renamed without changes
0  test/Less/Tests/Fixtures/css/functions.css → test/Less/Tests/Fixtures/less.js/css/functions.css
View
File renamed without changes
0  test/Less/Tests/Fixtures/css/import.css → test/Less/Tests/Fixtures/less.js/css/import.css
View
File renamed without changes
0  test/Less/Tests/Fixtures/css/lazy-eval.css → test/Less/Tests/Fixtures/less.js/css/lazy-eval.css
View
File renamed without changes
0  test/Less/Tests/Fixtures/css/media.css → test/Less/Tests/Fixtures/less.js/css/media.css
View
File renamed without changes
0  test/Less/Tests/Fixtures/css/mixins-args.css → test/Less/Tests/Fixtures/less.js/css/mixins-args.css
View
File renamed without changes
0  test/Less/Tests/Fixtures/css/mixins-closure.css → ...ess/Tests/Fixtures/less.js/css/mixins-closure.css
View
File renamed without changes
0  test/Less/Tests/Fixtures/css/mixins-nested.css → ...Less/Tests/Fixtures/less.js/css/mixins-nested.css
View
File renamed without changes
0  test/Less/Tests/Fixtures/css/mixins-pattern.css → ...ess/Tests/Fixtures/less.js/css/mixins-pattern.css
View
File renamed without changes
0  test/Less/Tests/Fixtures/css/mixins.css → test/Less/Tests/Fixtures/less.js/css/mixins.css
View
File renamed without changes
0  test/Less/Tests/Fixtures/css/operations.css → test/Less/Tests/Fixtures/less.js/css/operations.css
View
File renamed without changes
0  test/Less/Tests/Fixtures/css/parens.css → test/Less/Tests/Fixtures/less.js/css/parens.css
View
File renamed without changes
0  test/Less/Tests/Fixtures/css/rulesets.css → test/Less/Tests/Fixtures/less.js/css/rulesets.css
View
File renamed without changes
0  test/Less/Tests/Fixtures/css/scope.css → test/Less/Tests/Fixtures/less.js/css/scope.css
View
File renamed without changes
0  test/Less/Tests/Fixtures/css/selectors.css → test/Less/Tests/Fixtures/less.js/css/selectors.css
View
File renamed without changes
0  test/Less/Tests/Fixtures/css/strings.css → test/Less/Tests/Fixtures/less.js/css/strings.css
View
File renamed without changes
0  test/Less/Tests/Fixtures/css/variables.css → test/Less/Tests/Fixtures/less.js/css/variables.css
View
File renamed without changes
0  test/Less/Tests/Fixtures/css/whitespace.css → test/Less/Tests/Fixtures/less.js/css/whitespace.css
View
File renamed without changes
0  test/Less/Tests/Fixtures/less/colors.less → test/Less/Tests/Fixtures/less.js/less/colors.less
View
File renamed without changes
0  test/Less/Tests/Fixtures/less/comments.less → test/Less/Tests/Fixtures/less.js/less/comments.less
View
File renamed without changes
0  test/Less/Tests/Fixtures/less/css-3.less → test/Less/Tests/Fixtures/less.js/less/css-3.less
View
File renamed without changes
0  test/Less/Tests/Fixtures/less/css-escapes.less → ...Less/Tests/Fixtures/less.js/less/css-escapes.less
View
File renamed without changes
0  test/Less/Tests/Fixtures/less/css.less → test/Less/Tests/Fixtures/less.js/less/css.less
View
File renamed without changes
1  test/Less/Tests/Fixtures/less/functions.less → test/Less/Tests/Fixtures/less.js/less/functions.less
View
@@ -22,7 +22,6 @@
format-multiple: %("hello %s %d", "earth", 2);
format-url-encode: %('red is %A', #ff0000);
eformat: e(%("rgb(%d, %d, %d)", @r, 128, 64));
-
hue: hue(hsl(98, 12%, 95%));
saturation: saturation(hsl(98, 12%, 95%));
lightness: lightness(hsl(98, 12%, 95%));
0  test/Less/Tests/Fixtures/less/import.less → test/Less/Tests/Fixtures/less.js/less/import.less
View
File renamed without changes
0  ...ess/Tests/Fixtures/less/import/import-test-a.less → ...s/Fixtures/less.js/less/import/import-test-a.less
View
File renamed without changes
0  ...ess/Tests/Fixtures/less/import/import-test-b.less → ...s/Fixtures/less.js/less/import/import-test-b.less
View
File renamed without changes
0  ...ess/Tests/Fixtures/less/import/import-test-c.less → ...s/Fixtures/less.js/less/import/import-test-c.less
View
File renamed without changes
0  ...Less/Tests/Fixtures/less/import/import-test-d.css → ...ts/Fixtures/less.js/less/import/import-test-d.css
View
File renamed without changes
0  test/Less/Tests/Fixtures/less/lazy-eval.less → test/Less/Tests/Fixtures/less.js/less/lazy-eval.less
View
File renamed without changes
0  test/Less/Tests/Fixtures/less/media.less → test/Less/Tests/Fixtures/less.js/less/media.less
View
File renamed without changes
0  test/Less/Tests/Fixtures/less/mixins-args.less → ...Less/Tests/Fixtures/less.js/less/mixins-args.less
View
File renamed without changes
0  test/Less/Tests/Fixtures/less/mixins-closure.less → ...s/Tests/Fixtures/less.js/less/mixins-closure.less
View
File renamed without changes
0  test/Less/Tests/Fixtures/less/mixins-nested.less → ...ss/Tests/Fixtures/less.js/less/mixins-nested.less
View
File renamed without changes
0  test/Less/Tests/Fixtures/less/mixins-pattern.less → ...s/Tests/Fixtures/less.js/less/mixins-pattern.less
View
File renamed without changes
0  test/Less/Tests/Fixtures/less/mixins.less → test/Less/Tests/Fixtures/less.js/less/mixins.less
View
File renamed without changes
0  test/Less/Tests/Fixtures/less/operations.less → .../Less/Tests/Fixtures/less.js/less/operations.less
View
File renamed without changes
0  test/Less/Tests/Fixtures/less/parens.less → test/Less/Tests/Fixtures/less.js/less/parens.less
View
File renamed without changes
0  test/Less/Tests/Fixtures/less/rulesets.less → test/Less/Tests/Fixtures/less.js/less/rulesets.less
View
File renamed without changes
0  test/Less/Tests/Fixtures/less/scope.less → test/Less/Tests/Fixtures/less.js/less/scope.less
View
File renamed without changes
0  test/Less/Tests/Fixtures/less/selectors.less → test/Less/Tests/Fixtures/less.js/less/selectors.less
View
File renamed without changes
0  test/Less/Tests/Fixtures/less/strings.less → test/Less/Tests/Fixtures/less.js/less/strings.less
View
File renamed without changes
0  test/Less/Tests/Fixtures/less/variables.less → test/Less/Tests/Fixtures/less.js/less/variables.less
View
File renamed without changes
0  test/Less/Tests/Fixtures/less/whitespace.less → .../Less/Tests/Fixtures/less.js/less/whitespace.less
View
File renamed without changes
31 test/Less/Tests/ParserTest.php
View
@@ -7,9 +7,9 @@
class ParserTest extends \PHPUnit_Framework_TestCase
{
/**
- * @dataProvider provider
+ * @dataProvider lessJsProvider
*/
- public function testCssGeneration($less, $css)
+ public function testLessJsCssGeneration($less, $css)
{
$parser = new Parser();
@@ -19,10 +19,31 @@ public function testCssGeneration($less, $css)
$this->assertEquals($css, $less);
}
- public function provider()
+ public function lessJsProvider()
{
- $less = glob(__DIR__."/Fixtures/less/*.less");
- $css = glob(__DIR__."/Fixtures/css/*.css");
+ $less = glob(__DIR__."/Fixtures/less.js/less/*.less");
+ $css = glob(__DIR__."/Fixtures/less.js/css/*.css");
+
+ return array_map(function($less, $css) { return array($less, $css); }, $less, $css);
+ }
+
+ /**
+ * @dataProvider lessPhpProvider
+ */
+ public function testLessPhpCssGeneration($less, $css)
+ {
+ $parser = new Parser();
+
+ $less = $parser->parseFile($less)->getCss();
+ $css = file_get_contents($css);
+
+ $this->assertEquals($css, $less);
+ }
+
+ public function lessPhpProvider()
+ {
+ $less = glob(__DIR__."/Fixtures/less.php/less/*.less");
+ $css = glob(__DIR__."/Fixtures/less.php/css/*.css");
return array_map(function($less, $css) { return array($less, $css); }, $less, $css);
}
Please sign in to comment.
Something went wrong with that request. Please try again.