File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php namespace Reshadman \EloquentFaster \Tests ;
2+
3+ use Illuminate \Database \Eloquent \Model ;
4+ use Reshadman \EloquentFaster \EloquentClassFinder ;
5+ use Reshadman \EloquentFaster \FasterModel ;
6+
7+ class EloquentClassFinderTest extends \PHPUnit_Framework_TestCase {
8+
9+ public function test_eloquent_class_is_detected ()
10+ {
11+ $ testClasses = [
12+ SomeExampleModelClass::class,
13+ SomeExampleModelClassWithEloquent::class
14+ ];
15+
16+ $ finder = new EloquentClassFinder ();
17+
18+ $ classes = iterator_to_array ($ finder ->find ());
19+
20+ foreach ($ testClasses as $ testClass ) {
21+ $ this ->assertContains ($ testClass , $ classes );
22+ }
23+ }
24+
25+
26+ }
27+
28+ class SomeExampleModelClass extends FasterModel {
29+
30+ }
31+
32+ class SomeExampleModelClassWithEloquent extends Model {
33+
34+ }
You can’t perform that action at this time.
0 commit comments