Skip to content
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.

Commit

Permalink
Merge branch 'feature/update-docs-n-tests' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
hassankhan committed Dec 15, 2013
2 parents 37a560b + c38e373 commit 111f2bf
Showing 1 changed file with 26 additions and 20 deletions.
46 changes: 26 additions & 20 deletions tests/Zepto/FileLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,35 @@ protected function tearDown()
}

/**
* @covers Zepto\FileLoader::load()
* @covers Zepto\FileLoader::load()
* @expectedException Exception
*/
public function testLoad()
public function testLoadWithException()
{
$this->object->load('@£@', 'aa');
}

/**
* @covers Zepto\FileLoader::load
* @todo Implement testLoad().
* @covers Zepto\FileLoader::load
* @dataProvider providerTestLoadSingleFile
*/
public function testLoadSingleFile()
public function testLoadSingleFile($files)
{
$result = $this->object->load(ROOT_DIR . 'content/404.md', array('md'));
$this->assertEquals($files, $result);
}

/**
* @covers Zepto\FileLoader::load()
* @dataProvider providerTestLoadMultipleFiles
*/
public function testLoadMultipleFiles($files)
{
$result = $this->object->load(ROOT_DIR . 'content/sub', array('md'));
$this->assertEquals($files, $result);
}

public function providerTestLoadSingleFile()
{
$files['404.md'] = '/*' . PHP_EOL
. 'Title: Error 404' . PHP_EOL
Expand All @@ -52,15 +68,14 @@ public function testLoadSingleFile()
. '=========' . PHP_EOL . PHP_EOL
. 'Woops. Looks like this page doesn\'t exist.';

$result = $this->object->load(ROOT_DIR . 'content/404.md', array('md'));

$this->assertEquals($files, $result);
return array(array( $files ));
}

/**
* @covers Zepto\FileLoader::load()
* Data provider for tests
* @return array
*/
public function testLoadMultipleFiles()
public function providerTestLoadMultipleFiles()
{
$files = array(
'sub/page.md' => '/*' . PHP_EOL
Expand All @@ -82,15 +97,6 @@ public function testLoadMultipleFiles()
. 'Phasellus id massa eget nisl congue blandit sit amet id ligula.' . PHP_EOL
);


$result = $this->object->load(ROOT_DIR . 'content/sub', array('md'));
}

/**
* @covers class::()
*/
public function testCache()
{
$this->markTestIncomplete('Not yet implemented');
return array(array( $files ));
}
}

0 comments on commit 111f2bf

Please sign in to comment.