Skip to content

Commit 5c3ff0b

Browse files
author
Reza Shadman
committed
Add test for recursive requirer.
1 parent 6eab6f2 commit 5c3ff0b

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

tests/RecursiveRequirerTest.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php namespace Reshadman\EloquentFaster\Tests;
2+
3+
use Reshadman\EloquentFaster\RecursiveRequirer;
4+
5+
class RecursiveRequirerTest extends \PHPUnit_Framework_TestCase {
6+
7+
/**
8+
* @var RecursiveRequirer
9+
*/
10+
protected $_object;
11+
12+
public function setUp()
13+
{
14+
$this->_object = new RecursiveRequirer(__DIR__ . '/../src');
15+
}
16+
17+
public function test_require_once_method()
18+
{
19+
iterator_to_array($this->_object->requireOnceAllFiles());
20+
$this->assertContains('Reshadman\EloquentFaster\FasterModel', $classes = get_declared_classes());
21+
$this->assertContains('Reshadman\EloquentFaster\EloquentCacheClearCommand', $classes);
22+
}
23+
24+
}

0 commit comments

Comments
 (0)