Commit caa0fc0d authored by Taddeus Kroes's avatar Taddeus Kroes

Changed project name to BasicWeb.

parent 18311e43
-------
Summary
-------
Minimalistic is a set of classes to create websites with. The core exists of
a class autoloader, a template parser, a logger and some array manipulation
functions. No MVC 'model' implementation is included, there are already many
of these out there (PHPActiveRecord is recommended).
BasicWeb is a set of classes that provides the minimal functionalities of a
website. The core exists of a class autoloader, a template parser, a logger
and some array manipulation functions. No MVC 'model' implementation is
included, there are already many of these out there (PHPActiveRecord is
recommended).
----------
Unit tests
......
......@@ -7,7 +7,7 @@
* @date 13-07-2012
*/
namespace Minimalistic;
namespace BasicWeb;
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
* </code>
*
* @package Minimalistic
* @package BasicWeb
*/
class Autoloader extends Base {
/**
......
<?php
/**
* Commonly used classes used in the Minimalistic package.
* Commonly used classes used in the BasicWeb package.
*
* @author Taddeus Kroes
* @version 1.0
* @date 13-07-2012
* @package Minimalistic
*/
namespace Minimalistic;
namespace BasicWeb;
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
* shortcut for the class constructor.
*
* @package Minimalistic
* @package BasicWeb
*/
abstract class Base {
/**
......@@ -41,7 +40,7 @@ abstract class Base {
/**
* Exception, thrown when a required file does not exist.
*
* @package Minimalistic
* @package BasicWeb
*/
class FileNotFoundError extends \RuntimeException {
/**
......
......@@ -7,14 +7,14 @@
* @date 13-07-2012
*/
namespace Minimalistic;
namespace BasicWeb;
/**
* Logger class.
*
* A Logger object provides five functions to process log messages.
*
* @package Minimalistic
* @package BasicWeb
*/
class Logger {
const CRITICAL = 0;
......
<?php
require_once 'autoloader.php';
use Minimalistic\Autoloader;
use BasicWeb\Autoloader;
define('PATH', 'tests/_files/');
......@@ -49,7 +49,7 @@ class AutoloaderTest extends PHPUnit_Framework_TestCase {
/**
* @depends test_create_path
* @expectedException Minimalistic\FileNotFoundError
* @expectedException BasicWeb\FileNotFoundError
* @expectedExceptionMessage File "tests/_files/foobar.php" does not exist.
*/
function test_load_class_not_found() {
......
<?php
require_once 'base.php';
use Minimalistic\asprintf;
class BaseExtension extends Minimalistic\Base {
class BaseExtension extends BasicWeb\Base {
function __construct($foo, $bar) {
$this->foo = $foo;
$this->bar = $bar;
......@@ -16,10 +15,10 @@ class BaseTest extends PHPUnit_Framework_TestCase {
}
function test_asprintf() {
$this->assertEquals(Minimalistic\asprintf('%(foo) baz', array('foo' => 'bar')), 'bar baz');
$this->assertEquals(Minimalistic\asprintf('%(foo) baz %(foo)',
$this->assertEquals(BasicWeb\asprintf('%(foo) baz', array('foo' => 'bar')), 'bar baz');
$this->assertEquals(BasicWeb\asprintf('%(foo) baz %(foo)',
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');
}
}
......
<?php
require_once 'logger.php';
use Minimalistic\Logger;
use BasicWeb\Logger;
define('NAME', 'Testlogger');
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