Skip to content

Commit b55ead0

Browse files
author
Bauffman
committed
Adds tests for the Autoloader class.
1 parent 08d7f3d commit b55ead0

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

CHANGELOG

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
0.2 (xxxx-xx-xx)
2+
----
3+
- Added tests for the Autoloader class
4+
5+
16
0.1 (2011-12-24)
27
----
38
- Changed the internal architecture to work with a tokenizer.

Tests/AutoloaderTest.php

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
3+
/*
4+
* This file is part of Spoon Library.
5+
*
6+
* (c) Davy Hellemans <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the license
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Spoon\Template\Tests;
13+
use Spoon\Template\Autoloader;
14+
use Spoon\Template\Environment;
15+
16+
require_once realpath(dirname(__FILE__) . '/../') . '/Autoloader.php';
17+
require_once 'PHPUnit/Framework/TestCase.php';
18+
19+
class AutoloaderTest extends \PHPUnit_Framework_TestCase
20+
{
21+
public function setUp()
22+
{
23+
Autoloader::register();
24+
}
25+
26+
public function testAutoloaderSuccess()
27+
{
28+
$environment = new Environment();
29+
$this->assertTrue(true);
30+
}
31+
32+
public function testAutoloaderFailure()
33+
{
34+
$this->assertFalse(method_exists('FooBar', 'baz'));
35+
}
36+
}

0 commit comments

Comments
 (0)