OneOffTests.php
<?php
namespace Liaison\Test;
class OneOffTests extends \Taeluf\Tester {
public function testComponentAndRequestLifecycle(){
$lia = new \Liaison();
$package = new \Lia\Package($lia, dirname(__DIR__).'/extra/IntegrationPackage/');
$response = $lia->getResponse('/', 'GET');
var_dump(array_keys($lia->get('compo')));
exit;
//there should be a separate test regarding the ->compo() calls
// $component = $lia->compo($package->namespace().':'.'LifeCycleTestComponent');
$component = $lia->compo('LifeCycleTestComponent');
// print_r($component->actualStack);
return $this->compare(
$component->targetStack,
$component->actualStack
);
return false;
}
public function testGetCompoWithAndWithoutNamespace(){
$lia = new \Liaison();
$noNs = $lia->compo('Resources');
$yesNs = $lia->compo('lia:Resources');
$this->compare($noNs, $yesNs);
}
public function testPackageListHasPackage(){
$lia = new \Liaison();
$all = $lia->get('lia:package');
$package = $lia->getPackage('lia');
$this->isInstanceOf($package, '\\Lia\\Package');
}
}