Commit caa0fc0d authored by Taddeus Kroes's avatar Taddeus Kroes

Changed project name to BasicWeb.

parent 18311e43
------- -------
Summary Summary
------- -------
Minimalistic is a set of classes to create websites with. The core exists of BasicWeb is a set of classes that provides the minimal functionalities of a
a class autoloader, a template parser, a logger and some array manipulation website. The core exists of a class autoloader, a template parser, a logger
functions. No MVC 'model' implementation is included, there are already many and some array manipulation functions. No MVC 'model' implementation is
of these out there (PHPActiveRecord is recommended). included, there are already many of these out there (PHPActiveRecord is
recommended).
---------- ----------
Unit tests Unit tests
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* @date 13-07-2012 * @date 13-07-2012
*/ */
namespace Minimalistic; namespace BasicWeb;
require_once 'base.php'; require_once 'base.php';
...@@ -52,7 +52,7 @@ require_once 'base.php'; ...@@ -52,7 +52,7 @@ require_once 'base.php';
* $baz = new Baz(); // Throws an exception, since 'other_classes/baz.php' does not exist * $baz = new Baz(); // Throws an exception, since 'other_classes/baz.php' does not exist
* </code> * </code>
* *
* @package Minimalistic * @package BasicWeb
*/ */
class Autoloader extends Base { class Autoloader extends Base {
/** /**
......
<?php <?php
/** /**
* Commonly used classes used in the Minimalistic package. * Commonly used classes used in the BasicWeb package.
* *
* @author Taddeus Kroes * @author Taddeus Kroes
* @version 1.0 * @version 1.0
* @date 13-07-2012 * @date 13-07-2012
* @package Minimalistic
*/ */
namespace Minimalistic; namespace BasicWeb;
require_once 'logger.php'; require_once 'logger.php';
/** /**
* Base class for instantiable classes in the Minimalistic package. * Base class for instantiable classes in the BasicWeb package.
* *
* The base class defines a static 'create' method that acts as a chainable * The base class defines a static 'create' method that acts as a chainable
* shortcut for the class constructor. * shortcut for the class constructor.
* *
* @package Minimalistic * @package BasicWeb
*/ */
abstract class Base { abstract class Base {
/** /**
...@@ -41,7 +40,7 @@ abstract class Base { ...@@ -41,7 +40,7 @@ abstract class Base {
/** /**
* Exception, thrown when a required file does not exist. * Exception, thrown when a required file does not exist.
* *
* @package Minimalistic * @package BasicWeb
*/ */
class FileNotFoundError extends \RuntimeException { class FileNotFoundError extends \RuntimeException {
/** /**
......
...@@ -7,14 +7,14 @@ ...@@ -7,14 +7,14 @@
* @date 13-07-2012 * @date 13-07-2012
*/ */
namespace Minimalistic; namespace BasicWeb;
/** /**
* Logger class. * Logger class.
* *
* A Logger object provides five functions to process log messages. * A Logger object provides five functions to process log messages.
* *
* @package Minimalistic * @package BasicWeb
*/ */
class Logger { class Logger {
const CRITICAL = 0; const CRITICAL = 0;
......
<?php <?php
require_once 'autoloader.php'; require_once 'autoloader.php';
use Minimalistic\Autoloader; use BasicWeb\Autoloader;
define('PATH', 'tests/_files/'); define('PATH', 'tests/_files/');
...@@ -49,7 +49,7 @@ class AutoloaderTest extends PHPUnit_Framework_TestCase { ...@@ -49,7 +49,7 @@ class AutoloaderTest extends PHPUnit_Framework_TestCase {
/** /**
* @depends test_create_path * @depends test_create_path
* @expectedException Minimalistic\FileNotFoundError * @expectedException BasicWeb\FileNotFoundError
* @expectedExceptionMessage File "tests/_files/foobar.php" does not exist. * @expectedExceptionMessage File "tests/_files/foobar.php" does not exist.
*/ */
function test_load_class_not_found() { function test_load_class_not_found() {
......
<?php <?php
require_once 'base.php'; require_once 'base.php';
use Minimalistic\asprintf;
class BaseExtension extends Minimalistic\Base { class BaseExtension extends BasicWeb\Base {
function __construct($foo, $bar) { function __construct($foo, $bar) {
$this->foo = $foo; $this->foo = $foo;
$this->bar = $bar; $this->bar = $bar;
...@@ -16,10 +15,10 @@ class BaseTest extends PHPUnit_Framework_TestCase { ...@@ -16,10 +15,10 @@ class BaseTest extends PHPUnit_Framework_TestCase {
} }
function test_asprintf() { function test_asprintf() {
$this->assertEquals(Minimalistic\asprintf('%(foo) baz', array('foo' => 'bar')), 'bar baz'); $this->assertEquals(BasicWeb\asprintf('%(foo) baz', array('foo' => 'bar')), 'bar baz');
$this->assertEquals(Minimalistic\asprintf('%(foo) baz %(foo)', $this->assertEquals(BasicWeb\asprintf('%(foo) baz %(foo)',
array('foo' => 'bar')), 'bar baz bar'); array('foo' => 'bar')), 'bar baz bar');
$this->assertEquals(Minimalistic\asprintf('%(bar) baz %(foo)', $this->assertEquals(BasicWeb\asprintf('%(bar) baz %(foo)',
array('foo' => 'bar', 'bar' => 'foobar')), 'foobar baz bar'); array('foo' => 'bar', 'bar' => 'foobar')), 'foobar baz bar');
} }
} }
......
<?php <?php
require_once 'logger.php'; require_once 'logger.php';
use Minimalistic\Logger; use BasicWeb\Logger;
define('NAME', 'Testlogger'); define('NAME', 'Testlogger');
define('FORMAT', '%(level): %(message)'); define('FORMAT', '%(level): %(message)');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment