Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .dev/Bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php
include_once __DIR__ . '/ReadJsonFile.php';
/**
* Bootstrap for Testing
*
* @package Molajo
* @copyright 2014 Amy Stephen. All rights reserved.
* @copyright 2014-2015 Amy Stephen. All rights reserved.
* @license http://www.opensource.org/licenses/mit-license.html MIT License
*/
$base = substr(__DIR__, 0, strlen(__DIR__) - 5);
Expand All @@ -15,8 +16,9 @@

$classmap = array();
$classmap['Molajo\\Resource\\ClassMap'] = $base . '/Source/ClassMap.php';
$classmap['Molajo\\Resource\\ClassMap'] = $base . '/Source/ClassMap.php';
$classmap['Molajo\\Resource\\ResourceMap'] = $base . '/Source/ResourceMap.php';
$classmap['Molajo\\Resource\\Driver'] = $base . '/Source/Driver.php';
$classmap['Molajo\\Resource\\Proxy'] = $base . '/Source/Proxy.php';
$classmap['Molajo\\Resource\\Scheme'] = $base . '/Source/Scheme.php';
$results = createClassMap($base . '/Source/Adapter/', 'Molajo\\Render\\Adapter\\');
$classmap = array_merge($classmap, $results);
Expand All @@ -28,3 +30,4 @@ function ($class) use ($classmap) {
}
}
);
//include_once __DIR__ . '/Reflection.php';
2 changes: 1 addition & 1 deletion .dev/CreateClassMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Create Class Map
*
* @package Molajo
* @copyright 2014 Amy Stephen. All rights reserved.
* @copyright 2014-2015 Amy Stephen. All rights reserved.
* @license http://www.opensource.org/licenses/mit-license.html MIT License
*/

Expand Down
31 changes: 31 additions & 0 deletions .dev/ReadJsonFile.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
/**
* Read Json File
*
* @package Molajo
* @copyright 2014-2015 Amy Stephen. All rights reserved.
* @license http://www.opensource.org/licenses/mit-license.html MIT License
*/

function readJsonFile($file_name)
{
$temp_array = array();

if (file_exists($file_name)) {
} else {
return array();
}

$input = file_get_contents($file_name);

$temp = json_decode($input);

if (count($temp) > 0) {
$temp_array = array();
foreach ($temp as $key => $value) {
$temp_array[$key] = $value;
}
}

return $temp_array;
}
6 changes: 6 additions & 0 deletions .dev/Reflection.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php
$class = new ReflectionClass('Molajo\\Resource\\ResourceMap');
$methods = $class->getMethods();
foreach ($methods as $method) {
echo ' * @covers ' . $method->class . '::' . $method->name . PHP_EOL;
}
50 changes: 50 additions & 0 deletions .dev/Tests/ClassMapTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?php
/**
* ClassMap
*
* @package Molajo
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @copyright 2014-2015 Amy Stephen. All rights reserved.
*/
namespace Molajo\Resource;

/**
* Render Test
*
* @author Amy Stephen
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @copyright 2014-2015 Amy Stephen. All rights reserved.
* @since 1.0.0
*/
class ClassMapTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup
*
* @return $this
* @since 1.0.0
*/
protected function setUp()
{


return $this;
}

/**
* Test Resource Renderer
*
* @return $this
* @since 1.0.0
*/
public function testResource()
{

return $this;
}
}

class MockClassMap
{

}
Loading