<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -20,13 +20,32 @@ App::import('Core', array('Helper', 'AppHelper', 'ClassRegistry'));
 App::import('Helper', 'Media.Medium');
 require_once dirname(__FILE__) . DS . '..' . DS . '..' . DS . '..' . DS . 'fixtures' . DS . 'test_data.php';
 /**
+ * Mock Medium Helper
+ *
+ * @package    media
+ * @subpackage media.tests.cases.views.helpers
+ */
+class MockMediumHelper extends MediumHelper {
+
+	function versions() {
+		return $this-&gt;_versions;
+	}
+
+	function directories() {
+		return $this-&gt;_directories;
+	}
+}
+/**
  * Medium Helper Test Case Class
  *
  * @package    media
  * @subpackage media.tests.cases.views.helpers
  */
 class MediumHelperTestCase extends CakeTestCase {
+
 	function setUp() {
+		$this-&gt;_config = Configure::read('Media');
+
 		$this-&gt;TmpFolder = new Folder(TMP . 'tests' . DS, true);
 		$this-&gt;TmpFolder-&gt;create($this-&gt;TmpFolder-&gt;pwd() . 'static');
 		$this-&gt;TmpFolder-&gt;create($this-&gt;TmpFolder-&gt;pwd() . 'static' . DS . 'img');
@@ -64,11 +83,34 @@ class MediumHelperTestCase extends CakeTestCase {
 	}
 
 	function tearDown() {
+		Configure::write('Media', $this-&gt;_config);
 		$this-&gt;TestData-&gt;flushFiles();
 		$this-&gt;TmpFolder-&gt;delete();
 		ClassRegistry::flush();
 	}
 
+	function testConstruct() {
+		$settings = array(
+			'static' =&gt; array($this-&gt;TmpFolder-&gt;pwd() . 'static' . DS =&gt; 'media/static/'),
+			'theme' =&gt; array($this-&gt;TmpFolder-&gt;pwd() . 'theme' . DS  =&gt; 'media/theme/')
+		);
+		Configure::write('Media.filter', array(
+			'image'	 =&gt; array('s' =&gt; array(), 'm' =&gt; array()),
+			'video' =&gt; array('s' =&gt; array(), 'xl' =&gt; array())
+		));
+		$Helper = new MockMediumHelper($settings);
+
+		$this-&gt;assertEqual($Helper-&gt;versions(), array('s', 'm', 'xl'));
+
+		$expected = array(
+			'static' =&gt; $this-&gt;TmpFolder-&gt;pwd() . 'static' . DS,
+			'transfer' =&gt; MEDIA_TRANSFER,
+			'filter' =&gt;  MEDIA_FILTER,
+			'theme' =&gt; $this-&gt;TmpFolder-&gt;pwd() . 'theme' . DS
+		);
+		$this-&gt;assertEqual($Helper-&gt;directories(), $expected);
+	}
+
 	function testUrl() {
 		$result = $this-&gt;Helper-&gt;url('static/img/image-png');
 		$this-&gt;assertEqual($result, 'media/static/img/image-png.png');</diff>
      <filename>tests/cases/views/helpers/medium.test.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>6e960c256e48aada8f2baa9c9a24207587664662</id>
    </parent>
  </parents>
  <author>
    <name>David Persson</name>
    <email>davidpersson@gmx.de</email>
  </author>
  <url>http://github.com/davidpersson/media/commit/f2796ba049fd397b0645baac33ea66a87cfaca5f</url>
  <id>f2796ba049fd397b0645baac33ea66a87cfaca5f</id>
  <committed-date>2009-08-16T07:53:34-07:00</committed-date>
  <authored-date>2009-08-16T07:53:34-07:00</authored-date>
  <message>Adding test for merging of version in medium helper. Disproves #9.</message>
  <tree>2309128e69a9664fe7d2cad7415ccfca5fc70f20</tree>
  <committer>
    <name>David Persson</name>
    <email>davidpersson@gmx.de</email>
  </committer>
</commit>
