Permalink
Browse files

fixes

  • Loading branch information...
1 parent 22c6370 commit 0c7dbcf350dea640b4db42a52284008aec5a8e9b @kaviththiranga committed Aug 6, 2012
@@ -13,7 +13,7 @@
/**
* Test class for JMediaCompressor.
*/
-class JMediaCombinerTest extends TestCase
+class JMediaCombinerCssTest extends TestCase
{
/**
* @var JMediaCompressor
@@ -31,8 +31,18 @@ protected function setUp()
}
- public function testCombineFiles()
+ public function testCombine()
{
}
+ public function loadCssFiles()
+ {
+ // Path to source css files
+ $path = JPATH_BASE . '/test_files/css';
+
+ $files = JFolder::files($path,'.',false,true, array(), array('.min.css', '.php', '.html','.combined.css'));//get full path
+
+ return $files;
+ }
+
}
@@ -0,0 +1,55 @@
+<?php
+/**
+ * @package Joomla.UnitTest
+ * @subpackage Media
+ *
+ * @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE
+ */
+
+jimport('joomla.filesystem.file');
+jimport('joomla.filesystem.folder');
+
+/**
+ * Test class for JMediaCompressor.
+ */
+class JMediaCombinerJsTest extends TestCase
+{
+ /**
+ * @var JMediaCompressor
+ */
+ protected $object;
+
+
+ /**
+ * Sets up the fixture, for example, opens a network connection.
+ * This method is called before a test is executed.
+ */
+ protected function setUp()
+ {
+ $this->object = JMediaCombiner::getInstance(array('type' => 'js'));
+ }
+
+
+ public function testCombine()
+ {
+ $this->object->setSources($this->loadJsFiles());
+
+ $this->object->combine();
+
+
+
+
+ }
+
+ public function loadJsFiles()
+ {
+ // Path to source css files
+ $path = JPATH_BASE . '/test_files/js';
+
+ $files = JFolder::files($path,'.',false,true, array(), array('.min.js', '.php', '.html','.combined.js'));//get full path
+
+ return $files;
+ }
+
+}

0 comments on commit 0c7dbcf

Please sign in to comment.