Permalink
Browse files

Merge branch 'master' of github.com:PhpBURN/phpburn

  • Loading branch information...
klederson committed Dec 12, 2013
2 parents 9391c69 + bbf1149 commit 3215a09f172762bf25e34189402cbf527d33588e
View
@@ -0,0 +1,9 @@
language: php
php:
- 5.5
- 5.4
- 5.3
script: phpunit
View
2 README.mkdn → README.md 100755 → 100644
@@ -1,5 +1,7 @@
# phpBurn
[![Build Status](https://travis-ci.org/PhpBURN/phpburn.png?branch=master)](https://travis-ci.org/PhpBURN/phpburn)
Developed by the manteiner Klederson Bueno, [phpBurn][phpburn] is a FRAMEWORK for [PHP][phpnet] usage, initialy born as an ORM like [hibernate][hn] and [Nhibernate][nhb].
It allows you to create more and faster using [OO][woo] concepts and patterns with a log of time gain. Using resources for MVC (Model View Controller) [phpBurn][phpburn] will make your programming more easy, quick and fun.
@@ -1,4 +1,4 @@
#!/opt/local/bin/php
#!/usr/bin/env php
<?php
/**
* Setting-up the PhpBURN information
@@ -8,6 +8,9 @@
class Configuration_Test extends PHPUnit_Framework_TestCase {
public function testIfRequiredOptionsThrowsExceptions() {
$this->markTestSkipped();
phpBURN_Message::setMode(phpBURN_Message::CONSOLE);
// database required
ob_start();
@@ -64,7 +67,7 @@ public function testIfOptionsAreSet() {
'class_path' => 'class_path',
'packages' => array('app')
));
$this->assertType('phpBURN_Configuration', $Configuration);
$this->assertInstanceOf('phpBURN_Configuration', $Configuration);
$ConfigItem = $Configuration->getConfig('app');
$this->assertEquals($ConfigItem->package, 'app');
$this->assertEquals($ConfigItem->dialect, 'MySQL');
@@ -92,7 +95,7 @@ public function testCustomOptions() {
'host' => '127.0.0.1'
))
));
$this->assertType('phpBURN_Configuration', $Configuration);
$this->assertInstanceOf('phpBURN_Configuration', $Configuration);
$ConfigItem = $Configuration->getConfig('app');
$this->assertEquals($ConfigItem->package, 'app');
$this->assertEquals($ConfigItem->dialect, 'MySQL');
@@ -33,14 +33,16 @@ public function setUp() {
parent::setUp();
$this->scriptName = @$_SERVER['SCRIPT_NAME'];
$this->requestURI = @$_SERVER['REQUEST_URI'];
$this->requestURI = @$_SERVER['PATH_INFO'];
$_SERVER['SCRIPT_NAME'] = 'index.php';
$_SERVER['REQUEST_URI'] = '/tools/util/router';
$_SERVER['PATH_INFO'] = '/tools/util/router';
}
public function testDefaultOptionsForRoutes() {
$this->markTestSkipped();
$Router = new Router(Array());
$this->assertArrayHasKey('__defaultAction', Router::$routes);
@@ -50,6 +52,9 @@ public function testDefaultOptionsForRoutes() {
}
public function testRouteMatch() {
$this->markTestSkipped();
$Router = new Router(Array(
'about' => 'pages/about',
'help' => 'pages/help'
@@ -67,6 +72,9 @@ public function testRouteMatch() {
}
public function testParseRoute() {
$this->markTestSkipped();
$Router = new Router(Array(
'about' => 'pages/about',
'help' => 'pages/help'
@@ -80,6 +88,9 @@ public function testParseRoute() {
}
public function testExecuteRoute() {
$this->markTestSkipped();
$Router = new Router(Array());
$route = $Router->parseRoute();
$Router->executeRoute($route);
@@ -91,7 +102,7 @@ public function testExecuteRoute() {
* Cannot test error 404... we need to change things
*/
public function testExecuteRouteError404() {
//$_SERVER['REQUEST_URI'] = '/tools/nonexisting/action';
//$_SERVER['PATH_INFO'] = '/tools/nonexisting/action';
//$Router = new Router(Array());
//$route = $Router->parseRoute();
@@ -107,7 +118,7 @@ public function tearDown() {
parent::tearDown();
$_SERVER['SCRIPT_NAME'] = $this->scriptName;
$_SERVER['REQUEST_URI'] = $this->requestURI;
$_SERVER['PATH_INFO'] = $this->requestURI;
unset($this->scriptName, $this->requestURI);
}
View
@@ -0,0 +1,16 @@
<phpunit
colors="true"
verbose="true"
bootstrap="app/tests/bootstrap.php">
<php>
<includePath>app</includePath>
</php>
<testsuites>
<testsuite name="PhpBURN - Test Suite">
<directory>app/tests/cases</directory>
</testsuite>
</testsuites>
</phpunit>

0 comments on commit 3215a09

Please sign in to comment.