File tree Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /**
4+ * This file is part of CodeIgniter 4 framework.
5+ *
6+ * (c) CodeIgniter Foundation <admin@codeigniter.com>
7+ *
8+ * For the full copyright and license information, please view
9+ * the LICENSE file that was distributed with this source code.
10+ */
11+
12+ namespace Tests \Support \Models ;
13+
14+ use CodeIgniter \Model ;
15+
16+ class BarModel extends Model
17+ {
18+ }
Original file line number Diff line number Diff line change 99 * the LICENSE file that was distributed with this source code.
1010 */
1111
12- use Tests \Support \Models \EntityModel ;
13-
1412use function PHPStan \Testing \assertType ;
1513
1614$ class = (static fn (): string => mt_rand (0 , 10 ) > 5 ? stdClass::class : 'Foo ' )();
1715
1816assertType ('null ' , model ('foo ' ));
1917assertType ('stdClass ' , model (stdClass::class));
2018assertType ('Closure ' , model (Closure::class));
21- assertType ('Tests\Support\Models\EntityModel ' , model (EntityModel::class));
22- assertType ('Tests\Support\Models\EntityModel ' , model ('EntityModel ' ));
2319assertType ('null ' , model ('App ' ));
2420assertType ('object|null ' , model ($ class ));
21+
22+ // don't use test models used in other tests, as MemoizingReflectionProvider
23+ // messes autoload causing unknown class errors
24+ assertType ('Tests\Support\Models\BarModel ' , model ('BarModel ' ));
You can’t perform that action at this time.
0 commit comments