Skip to content

Commit

Permalink
Ajustes no application e call
Browse files Browse the repository at this point in the history
  • Loading branch information
toninho09 committed May 27, 2016
1 parent aee19b5 commit 23ae9c1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/Molecular/Framework/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class Application
public $route;
public $container;
public $cache;
public static $instance;
/**
* Application constructor.
*/
Expand All @@ -36,6 +37,7 @@ public function __construct()
$this->container = new ServiceContainer();
$cache = new CacheControler();
$this->cache = $cache->getHandle();
self::$instance = $this;
}

public function addMolecule(AbstractMolecule $molecule){
Expand Down
2 changes: 1 addition & 1 deletion src/Molecular/Helper/Callbacks/Call.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function isRunnable($function){
*/
private function runNameFunction($function, $match)
{
preg_match("/(\w+)@(\w+)/", $function, $funcParams);
preg_match("/(.*)@(\w+)/", $function, $funcParams);
unset($funcParams[0]);
if (count($funcParams) != 2) {
throw new \Exception("Method call is not 'CLASS@METHOD' ");
Expand Down
1 change: 1 addition & 0 deletions test/Molecular/View/ViewTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public function testRender(){
$view->setFile('testeViewRender.php');

$this->assertEquals($view->render(),'ok');
$this->assertEquals((string)$view,'ok');

}
}

0 comments on commit 23ae9c1

Please sign in to comment.